How to install Cassandra on Ubuntu 16.04 LTS?
Introduction
Cassandra is a No-SQL database designed and developed by Apache Software Foundation. It is written in Java and works on cross-platform. It was first released in 2008.
This database is known for it’s performance and high availability with no single point of failure.
It is cross-platform, so can be installed on any operating system. Here, in this tutorial, we will install it on the Ubuntu 16.04 LTS operating system.
This whole process requires some prerequisites and includes the following steps.
Prerequisites
- Ubuntu
- Java
- login as a root to the terminal
Cassandra Installation
1) Add Cassandra Repository
Use the following command to add cassandra repository to
/etc/apt/sources.list.d/cassandra.sources.list
2) Add Cassandra Repository Keys
3) Update the repository
4) Install Cassandra
After installation, we can verify that Cassandra is running or not, by using the following command. By default Cassandra service is started.
Well, we have successfully installed Cassandra. Now we can perform database operations.
Extra Info
Following are some useful commands that can be used to manage Cassandra database.
Start Cassandra
Use the following command to start Cassandra.
Stop Cassandra
Use the following command to stop Cassandra.
Restart Cassandra
Use the following command to restart Cassandra service.
Cassandra Status
Use the following command to check running status of Cassandra.
Cassandra file storage path
- Default location of Cassandra configuration files is /etc/cassandra.
- Default location of Cassandra log files location is /var/log/cassandra/ and /var/lib/cassandra
- Cassandra start-up and memory management is located into /etc/default/cassandra.