A functional quality application needs a quality database manager. Especially when the application is designed for web and with multiple execution nodes. In this sense, most of the best available solutions are open source. This gives us an idea of the great quality of programs that exist whose developers release the source code of the application. On the other hand, these database managers can be SQL or NoSQL according to the need of the application. So in this post, you will learn how to install a NoSQL and open source database manager like Apache Cassandra on Debian 10.
Apache Cassandra is one of those applications that would take many post to cover all its features. In general, it is a NoSQL database manager that is sponsored by the Apache foundation. This way it is easy to assume that it is open source and that it is strongly supported by the community.
Its main utility? is that it allows to make high-performance data clusters worldwide and above all we can make changes without data loss or falls. Then, the segment to which it is directed is a little less broad than other alternatives such as MongoDB.
Install Apache Cassandra on Debian 10
First of all, we recommend that you upgrade your system before you start installing Apache Cassandra. So let’s go for it.
:~$ sudo apt update :~$ sudo apt upgrade
Apache Cassandra can be installed through its binaries available on the project website. However, it is not so easy to do. Fortunately, there is another, more reliable way to install it.
Open a terminal session on your computer with Debian 10 and install these necessary packages:
:~$ sudo apt install wget curl gnupg gnupg1 gnupg2
Then, after the installation is finished you have to download the GPG key to add the Cassandra repository for Debian 10.
So, run the following command:
:~$ curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
Then, add the Apache Cassandra repository to Debian 10 sources list.
:~$ echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
In this way, we are adding the repository for the 3.11 branch of Apache Cassandra. In fact, at the time of writing this post, the latest available version is 3.11.6.
Then, refresh the APT cache.
:~$ sudo apt update
Also you can read APT: The Ubuntu package manager
Now, you can install Apache Cassandra by running the following command:
:~$ sudo apt install cassandra
Now you have to start and enable the service to start the system. Then it is a good idea to check the status of the service.
:~$ sudo systemctl enable cassandra :~$ sudo systemctl start cassandra :~$ sudo systemctl status cassandra
Apache Cassandra is installed, but before using it you have to configure it a bit.
Configure Apache Cassandra before use it
If you are going to use Cassandra for a single node, then the default setting is good. However, it is possible to configure a little Cassandra if you are going to use it for create a cluster.
:~$ sudo nano /etc/cassandra/cassandra.yaml
In this file you first have to change the name of the cluster.
cluster_name : ['cluster_name']
Next, you need to set the seeds of the cluster. You have to add the IP address separated by comma.
seeds: ["ip_address", "ip_address"]
It is also recommended to change the default port to increase security. However, it is not mandatory.
Next, restart the Apache Cassandra service.
:~$ sudo systemctl restart cassandra
And that is it.
So, in this post you learned how to install Apache Cassandra on Debian 10 Buster. With this NoSQL database manager you will be able to cluster data at the level of large networks. All without sacrificing system resources and with high performance without packet loss.
You can also read How to install Apache Cassandra on Debian 9 Stretch?
Please share this post with your friends and join our Telegram channel.