Tomcat , Active MQ, Cassandra on Linux

Simple and Quick temporary setup on Linux

TOMCAT INSTALLATION ON LINUX
****************************
$ wget http://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz                                                                                                 //downloading tomcat 8

$ tar -xvf apache-tomcat-8.5.20.tar.gz //extracting downloaded file

$ cd apache-tomcat-8.5.20/bin //changing directory to bin

$ ./startup.sh //starting tomcat server

ACTIVEMQ INSTALLATION ON LINUX
******************************
$ wget http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.tar.gz&action=download

$ tar -xvf apache-activemq-5.15.0-bin.tar.gz

$ cd apache-activemq-5.15.0-bin.tar.gz/bin/linux-x86-64/

$ ./activemq start //starting activemq server


MYSQL/mariadb INSTALLATION ON LINUX
***********************************
CentOS 7
--------

$ sudo yum install mariadb-server //installing mariadb server

$ sudo systemctl start mariadb //starting server

$ sudo systemctl status mariadb

$ sudo systemctl enable mariadb //making it as start up app

$ sudo mysql_secure_installation //setting root password

$ mysql -u root -p //logging in to database

> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; //creating user
> GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;                                                                        //granting permissions for user

Ubuntu 16
---------

$ sudo apt-get install software-properties-common

$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu xenial main'

$ sudo apt update -y

$ sudo apt install -y mariadb-server

$ sudo systemctl start mariadb.service

$ sudo systemctl enable mariadb.service

$ sudo /usr/bin/mysql_secure_installation

$ mysql -u root -p

> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

CASSANDRA INSTALLATION ON LINUX
*******************************
Ubuntu
------

$ echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list //Adding the Apache repository of Cassandra

$ curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -        //Adding the Apache Cassandra repository keys

$ sudo apt-get update

$ sudo apt-get install cassandra

$ sudo service cassandra start

CentOS
------
$ nano /etc/yum.repos.d/cassandra.repo
//Adding the Apache repository of Cassandra
[cassandra]
name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS

ctrl+o <enter> ctrl+x

$ sudo yum install cassandra

$ service cassandra start

$ systemctl daemon-reload

$ chkconfig cassandra on



Note: Ignore //text cause it's just a description against mentioned command
and the above applications needed JAVA to be installed on particular server/machine 

Comments