How To Install Cassandra on CentOS 7

Step 1: Install Java


First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.

yum -y update


At this point, installing lsyncd is as simple as running just one command:

yum -y install java


Step #2: Add the DataStax Community Repository


vim /etc/yum.repos.d/datastax.repo


Add the following information to the file you’ve created, using i to insert:

[datastax]
name = DataStax Repo for Apache Cassandra
baseurl = http://rpm.datastax.com/community
enabled = 1
gpgcheck = 0


Then exit and save the file with the command :wq (see the example below):

How To Install Cassandra 2 and Run a Single Node Cluster on CentOS 6 - 02 DataStax Repo


Step #3: Install Apache Cassandra 2


At this point, installing Cassandra is as simple as running just one command:

yum -y install dsc20


Step #4: Get Cassandra Running


Start-Up Cassandra

systemctl start cassandra


Check Cassandra Service Status

systemctl status cassandra


Enable Cassandra to Start at Boot

systemctl enable cassandra


Enter the Cassandra Command Line

cqlsh


The cqlsh interface should look similar to:

Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.10 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
cqlsh>


Check Cassandra Node Status

nodetool status


Restart Cassandra

 

systemctl restart cassandra


Shutdown Cassandra

service cassandra stop

  • 19 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install Pip on Ubuntu 14.04 LTS

Pip is a tool for installing and managing Python packages. Python is a programming language. It...

How to Add a User and Grant Root Privileges on Ubuntu 14.04

Step 1: Add the User It’s just one simple command to add a user. In this case, we’re...

How to Check Your Ubuntu Version

The following command works with all Ubuntu versions. lsb_release -a You should receive a...

How to Install and Configure ProFTPD on Ubuntu 12.04 LTS

Step 1: Install ProFTPD Warning: FTP data is insecure; traffic is not encrypted, and all...

Update and Patch OpenSSL on CentOS for the CCS Injection Vulnerability

What is OpenSSL? OpenSSL is a common cryptographic library which provides encryption,...

Powered by WHMCompleteSolution