6 C
Texas
angeloma
Senior Writer and partner

Install Apache Cassandra on Debian 9?

In the business world, quite special database handlers are needed. These database handlers must have the characteristic of scalability and robustness. That is why the Apache Foundation provides us with a set of tools for the deployment of business infrastructure. Recently, we talked about Apache ActiveMQ and today we will do it with Apache Cassandra. With this in mind, today I will teach you how to install Apache Cassandra and then show you how to configure it.

Apache Cassandra is a distributed NoSQL database based on an open-source “value-key” storage model written in Java. Being a business database manager, the Data is automatically replicated to multiple nodes for fault-tolerance. Replication across multiple data centers is supported. In addition, failed nodes can be replaced with no downtime.

There are many more features that make Apache Cassandra a reference in the sector of enterprise databases. For example, scalability is its other strength. Cassandra is used by many companies with many replicable nodes.

So, let us start to install Apache Cassandra on Debian 9.

1. Upgrade your system

- Advertisement -

First, you need to update the system. To do this, open a terminal and run.

:~$ su
:~# apt update && apt upgrade

1.- Upgrade the system
1.- Upgrade the system

After that, you will have an updated and robust system thanks to the security patches. So now you can continue.

2. Install Apache Cassandra

There are two ways to perform the installation. The first is through the binaries downloaded from the website. This is a simple way to achieve the installation, however, it is not the easiest and many may find it difficult.

Thus, we are going to use the .deb packages repository to make the installation as simple as possible and the best of all is that we will get the latest stable version.

So, add the Apache Cassandra repository.

:~# echo "deb http://www.apache.org/dist/cassandra/debian 39x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list

After that, add the public key.

:~# curl https://www.apache.org/dist/cassandra/KEYS | apt-key add -

2.- Adding the GPG key
2.- Adding the GPG key

NOTE: If you don’t have CURL installed, you can run the “apt install curl” command.

After that, you need to refresh the APT cache.

:~# apt update

3.- Refresh the APT cache
3.- Refresh the APT cache

Then, install Apache Cassandra.

:~# apt install cassandra

4.- Install Apache Cassandra
4.- Install Apache Cassandra

 

Now, you need to enable, start, and check the Cassandra service.

:~# systemctl enable cassandra
:~# systemctl start cassandra
:~# systemctl status cassandra

5.- The Cassandra service
5.- The Cassandra service

3. Configure Cassandra

On the Cassandra web site, the developers say: “For running Cassandra on a single node, the default configuration is enough, you shouldn’t need to change any configuration. However, when you deploy a cluster of nodes or use clients that are not on the same host, then there are some parameters that must be changed.”

So, let us change these parameters.

:~# nano /etc/cassandra/cassandra.yaml

6.- The cassandra file configuration
6.- The Cassandra file configuration

First, the cluster name. Obviously. Replace the default by yours.

7.- Change the cluster name
7.- Change the cluster name

Next, you need to set the seeds of the cluster. You have to add the IP address separated by comma.

8.- Seeds
8.- Seeds

If you want to increase security you can change the storage port. However, remember to modify your firewall settings to make that port available. In the listen_adress parameter, you must add the IP address of your central node. This is what allows other nodes to communicate with this node. So, it is important that you change it.

9.- Storage port
9.- Storage port

With these configurations, you can start to use Apache Cassandra.

Conclusion

Although Apache Cassandra is a high-performance application used by many large enterprises, its installation is not complex. Their website offers useful information about this powerful tool.

Please share this post with your friends.

 

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article