Configure single node Cassandra in VPS server
2 min readMay 17, 2018
Our agenda here is to configure a single node cluster of Cassandra in a VPS/dedicated server
- Cassandra depends on Java, please install Java 7 or 8 or 9 before installing Cassandra.
- here is a link to install java on ubuntu 16.04 https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
- go to http://cassandra.apache.org/download to install Cassandra in your server.
- run command sudo /etc/init.d/cassandra start or sudo service cassandra start to run Cassandra. Now we have to do some tweaking to configure it in the server properly.Let's start :
Cassandra has it’s own configuration file as yaml. We can find it in /etc/cassandra/cassandra.yaml. We need to edit default settings of it.
- We need to configure rpc_address to 0.0.0.0 .
- Comment out broadcast_rpc_address to private IP of the server.
- We will search for all the timeouts and need to increase timeouts to multiple of 10.
- The last thing to change the default authentication settings.search for auth, we will get a key-value pair with value AllowAll Authenticator. We need to change it to PasswordAuthenticator.
- Save all the changes and restart Cassandra with sudo etc/init.d/cassandra restart and guess what we are done.
N.B: As we have enabled password based authentication we need to provide the username, password along with connection string.