about 9 years ago
About Cassandra: Cassandra/ Apache Cassandra is scalable NoSQL database system. It is used to manage large amount of structured, semi-structured and non structured data. I am writing this blog which will help you to install and run a single-node cluster on Ubuntu 14.04. Cassandra's architecture allows to connect and access data using the CQL language. CQL uses a similar syntax to SQL.
Step 1: Installing Oracle Java Virtual Machine
Update the package database:
Now install the Oracle JRE. When prompted, accept the license agreement:
After installing it, please do verify that it's the default JRE:
Change the 22x
to match the latest version. For example: Use 23x or 24x
if Cassandra 2.3 or 2.4 is the latest version:
Now add the repository source:
Now Add three public keys with the package repositories to avoid package signature warnings during package updates
Now add the second key:
Then add the third key:
Now please update the package database once again:
Now final step is to update Cassandra
Cassandra is installed now and it will not start at this point due to some bugs that we need to fix it. To confirm cassandra is not running run following command:
If Cassandra is not running then it will show you the following output:
Now we will fix bugs that come after installation is completed
That line should read:
Change it to:
Now close and save the file, then reboot the server:
After logging back, Cassandra should be running now.
If Cassandra is running successfully then you will see the following output:
Step4: Connecting to Cluster:
If you were able to successfully start Cassandra, check the status of the cluster:
Output
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 127.0.0.1 142.02 KB 256 ? 2053956d-7461-41e6-8dd2-0af59436f736 rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
Output
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 127.0.0.1 142.02 KB 256 ? 2053956d-7461-41e6-8dd2-0af59436f736 rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
Then connect to it using its interactive command line interface cqlsh
.
You will see it connect:
Now type exit
to quit:
All done! You now have a single-node Cassandra cluster running on Ubuntu 14.04.
Thanks for reading blog
0 Comment(s)