How to install Cassandra 3.3 on Ubuntu

Step 1: Install\Upgrade to Java 8

3.0 and later require Java 8u40 or later.

[root@ubuntu ~] sudo add-apt-repository ppa:webupd8team/java -y
[root@ubuntu ~] sudo apt-get update
[root@ubuntu ~] sudo apt-get install oracle-java8-set-default

Verify with the command:

[root@ubuntu ~] java -version

if you upgraded java make sure that

[root@ubuntu ~]  echo $JAVA_HOME

Step 2: Installing Cassandra 3.3

Copy\Paste the following commands:

[root@ubuntu ~] echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
[root@ubuntu ~] echo "deb 33x  main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
[root@ubuntu ~] echo "deb-src 33x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
[root@ubuntu ~] gpg --keyserver --recv-keys F758CE318D77295D
[root@ubuntu ~] gpg --export --armor F758CE318D77295D | sudo apt-key add -
[root@ubuntu ~] gpg --keyserver --recv-keys 2B5C1B00
[root@ubuntu ~] gpg --export --armor 2B5C1B00 | sudo apt-key add -
[root@ubuntu ~] gpg --keyserver --recv-keys 0353B12C
[root@ubuntu ~] gpg --export --armor 0353B12C | sudo apt-key add -
[root@ubuntu ~] sudo apt-get update
[root@ubuntu ~] sudo apt-get install cassandra

Verify with:

[root@ubuntu ~] cassandra -v
[root@ubuntu ~] cqlsh
Connected to Test cluster at
[cqlsh 5.0.1 | Cassandra 3.3 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.


1 Comment

  1. Jhon   •  

    Why I’m getting this error:
    Connection error: (‘Unable to connect to any servers’, {‘’: error(111, “Tried connecting to [(‘’, 9042)]. Last error: Connection refused”)})

Leave a Reply

Your email address will not be published. Required fields are marked *