NoSQL database is the trend nowadays and it should persist for the next couple of years until something better comes out. It’s growing more and more in IoT based environments as well due to the vastness of the data volume. Apache Cassandra is one of the most popular names in the IoT and NoSQL domain.
Today we will provide step by step installation guide to Apache Cassandra to Ubuntu 18.04 LTS. So let’s assume that we will be using fresh installed Ubuntu 18.04 LTS x86_64.
Please note, the latest version of Apache Cassandra depends on Java 1.8, so we have to make sure that we install Java 1.8 to the system as pre-requisites.
# update system applications $ sudo apt update && sudo apt upgrade -y # install Java 1.8 $ sudo apt install openjdk-8-jdk -y # add apache cassandra repository to ubutnu $ echo "deb http://www.apache.org/dist/cassandra/debian 36x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.list $ sudo gpg --keyserver pgp.mit.edu --recv-keys 749D6EEC0353B12C # pull latest repository information and install cassandra $ sudo apt-get update $ sudo apt-get install cassandra # enable cassandra as system service $ systemctl enable cassandra # start cassandra service $ systemctl start cassandra
Now we should have the Apache Cassandra installed to our system and ready to use. You can check the status of the service as follows:
$ systemctl -l status cassandra
If things as running smoothly so far(which we expect), then the following command should give you the Apache Cassandra console to start working.
$ cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 3.11.3 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh>
Please let us know for any issues in the comments section, we should try to resolve that as soon as possible.