Installation of Cassandra in the Ubuntu Server 12.04 can be performed in multiple ways. In this article, I will focus on utilizing the ‘apt-get
’ command line utility to install ‘Cassandra
’. This information is also documented at the ‘Cassanda Wiki’.
Please note that its recommended to have ‘Oracle JDK at-least version 6’ installed in the machine before installing Cassandra.
Step 1: Add the required repositories.
sudo echo "deb http://www.apache.org/dist/cassandra/debian 11x main" >> /etc/apt/sources.list; sudo echo "deb-src http://www.apache.org/dist/cassandra/debian 11x main" >> /etc/apt/sources.list
Step 2: Update.
sudo apt-get update
Step 3: If you see a GPG Error
indicating failure to verify signatures, add the PUBLIC_KEY
by executing the below commands:
gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D; gpg --export --armor F758CE318D77295D | sudo apt-key add -
Step 4: Issue sudo apt-get update
again and verify if you hit the GPG signature verification error again. If yes, you may need to add another PUBLIC_KEY using the commands listed below:
gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00; gpg --export --armor 2B5C1B00 | sudo apt-key add -
Step 5: Issue the sudo apt-get update
again and if the command is successful, install Cassandra using;
sudo apt-get install cassandra
If the last command completes successfully, Cassandra should be running in your machine.
References:
- Cassandra wiki: http://wiki.apache.org/cassandra/FrontPage
- Cassandra Getting Started Guide: http://wiki.apache.org/cassandra/GettingStarted
- Cassandra Debian Packaging: http://wiki.apache.org/cassandra/DebianPackaging