In this article, we will see how to install Cassandra on RHEL step by step.
What is Apachae Cassandra]
Cassandra is a NoSQL distributed database. By design, NoSQL databases are lightweight, open-source, non-relational, and largely distributed. Counted among their strengths are horizontal scalability, distributed architectures, and a flexible approach to schema definition.
How to install Cassandra on RHEL
Prerequisites to Apache Cassandra on RHEL:
1. Install the latest version of Java 8 or Java 11, either the Oracle Java Standard Edition 8 / Oracle Java Standard Edition 11 (Long Term Support) or OpenJDK 8 / OpenJDK 11. To verify that you have the correct version of java installed, type java -version.
2. Install Java jdk 11 on RHEL using this or go to the below link.
3. For using cqlsh, the latest version of Python 3.6+ or Python 2.7. Now verify python version using below link:
python --version
4. Now create file /etc/yum.repos.d/cassandra.repo and paste below command in the file and save it. Where 41x means version number 4.1. If we want to install 4.0 then we have to give 40x.
[cassandra] name=Apache Cassandra baseurl=https://redhat.cassandra.apache.org/41x/ gpgcheck=1 repo_gpgcheck=1 gpgkey=https://downloads.apache.org/cassandra/KEYS
5. Now, run update command.
sudo yum update
6. Now install cassandra using yum.
sudo yum install cassandra
7. Now install the cassandra service using below command:
sudo service cassandra start
8. Verify the status of cassandra service RHEL using below command:
udo service cassandra status