In this article, we will install apache cassandra on Centos 7 in a Standalone structure.
Now let’s start installing our Cassandra NoSQL database on Centos 7 step by step.
Step1: Install Required Packages
We start with the required package installations.
1 2 3 4 5 6 7 8 |
#yum -y install epel-release #yum -y update yum install -y htop #um install -y iotop #yum install -y atop# #yum -y install java yum install vim -y yum install wget -y |
Step2: Java Installation and Configuration
Install Java
We are installing Java.
1 |
sudo yum install java -y |
Check Java Version
We check our Java version.
1 |
sudo java -version |
Create JAVA_HOME Environment Variable
Optionally, you can create the JAVA_HOME environment variable as follows:
1 2 3 4 5 6 7 8 9 10 11 12 |
echo $JAVA_HOME vim ~/.bash_profile # add following to the bottom line. export JAVA_HOME=/usr/java/jdk1.8.0_131/ export JRE_HOME=/usr/java/jdk1.8.0_131/jre source ~/.bash_profile echo $JAVA_HOME /usr/java/jdk1.8.0_131/ |
Step3: Create Repository
We create the repo.
1 |
vim /etc/yum.repos.d/cassandra.repo |
We add the following information to the repo and save.
1 2 3 4 5 6 |
[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 |
Step4: Install Cassandra
Now we are installing Cassandra.
1 |
yum -y install cassandra |
We run the Daemon Reload command.
1 |
systemctl daemon-reload |
Start Cassandra Service
1 |
systemctl start cassandra |
Enable Cassandra Service
1 |
systemctl enable cassandra |
Check the Status
1 |
nodetool status |
We have completed Apache Cassandra Installation on our system. Our next article will be Apache Cassandra Cluster and its features.
Thank you.