Configure single node Cassandra in VPS server

TEJOMAY SAHA
2 min readMay 17, 2018

Our agenda here is to configure a single node cluster of Cassandra in a VPS/dedicated server

  1. Cassandra depends on Java, please install Java 7 or 8 or 9 before installing Cassandra.
  2. 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
  3. go to http://cassandra.apache.org/download to install Cassandra in your server.
  4. 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.

  1. We need to configure rpc_address to 0.0.0.0 .
  2. Comment out broadcast_rpc_address to private IP of the server.
  3. We will search for all the timeouts and need to increase timeouts to multiple of 10.
  4. 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.
  5. 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.

--

--

TEJOMAY SAHA

I am a lead engineer who loves to learn, share, explore life differently