FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 207   



Below are the steps to install Cassandra-3.0.14 in Ubuntu Machine

1.) First goto a Location where you would like to install Cassandra,

  [email protected]:/$ cd /home/userName/softwares

2.) Get the Cassandra tar file using 'wget' command

 [email protected]:~/softwares$wget 'http://redrockdigimark.com/apachemirror/cassandra/3.0.14/apache-cassandra-3.0.14-bin.tar.gz'

3.) Untar the downloaded Cassandra tar file by using below command

[email protected]:~/softwares$ tar -xvzf apache-cassandra-3.0.14-bin.tar.gz

4.) Set the path of Cassandra in bashrc file

[email protected]:~/softwares$ vi ~/.bashrc
export CASSANDRA_HOME=/home/userName/softwares/apache-cassandra-3.0.14
export PATH=$PATH:$JAVA_HOME/bin:$CASSANDRA_HOME/bin

5.) Create two directories, one in /var/lib folder and other in /var/log folder which will be used by Cassandra to write its log and other data as shown below

[email protected]:~/softwares$ mkdir /var/lib/cassandra
[email protected]:~/softwares$ mkdir /var/log/cassandra

Provide full permissions to these two files as shown below

[email protected]:~/softwares$ chmod 777 -R  /var/lib/cassandra
[email protected]:~/softwares$ chmod 777 -R  /var/log/cassandra

6,) Open cassandra.yaml file present in conf folder, Change the rpc_address to point to the machine's IP or hostname instead of 0.0.0.0/localhost. By default the start_rpc is set to false in the cassandra.yaml file. Set it to start_rpc: true

[email protected]:~/softwares$ cd  apache-cassandra-3.0.14/conf

[email protected]:~/softwares/apache-cassandra-3.0.14/conf$ vi cassandra.yaml
rpc_address: hostName
start_rpc: true

7.) Start the Cassandra Server

[email protected]:~/softwares/apache-cassandra-3.0.14/bin$
./cassandra -f

If wanted, We can also start Cassandra Server with root user with ./cassandra -R -f command

8.) Open new Terminal and provide below command

 [email protected]:~/softwares/apache-cassandra-3.0.14/bin$ cqlsh  hostName



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News