We need Java in order to have Cassandra running since Cassandra 2.0 and later require Java 7 or later. And we need Cassandra in order to run Kong.
So lets start installing Java 8 (the newest one)
First we add a repository to our build in order to manage the Java 8 package, since that is not normally supported by Ubuntu.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Now the repository have been added and updated we can go ahead and install Java 8
sudo apt-get install oracle-java8-installer
If you wish to install Java 7 instead, use this:
sudo apt-get install oracle-java7-installer
That will keep your Java installation up to date.
Now we need to setup the Java environment variables JAVA_HOME
and PATH
, luckily we can do that in another singe command:
sudo apt-get install oracle-java8-set-default
For Java 7 use:
sudo apt-get install oracle-java7-set-default
Now Java is fully installed on your server.
Now we can install Cassandra since we have installed Java, and Java 7+ is required for Cassandra 2.0+.
First we we will have to add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list
echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
Then we will have to add the DataStax repository key to your aptitude trusted keys.
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
Now when that is done we can go ahead update and install Cassandra.
sudo apt-get update
sudo apt-get install cassandra
We need to do a small configuration in order to have Cassandra working proberly.
Open /etc/passwd
and change
cassandra:x:***:***:Cassandra database,,,:/var/lib/cassandra:/bin/false
to
cassandra:x:***:***:Cassandra database,,,:/var/lib/cassandra:/bin/bash
Note: Do only change the /bin/false
part to /bin/bash
. Everything else in the line to remain as it is.
Now we can run Cassandra
sudo /usr/sbin/cassandra
First we have to download the file from Kong's website. Luckily we can do that pretty easy:
wget "https://github.com/Mashape/kong/releases/download/0.3.2/kong-0.3.2.trusty_all.deb"
Now when we have the file we can install Kong, but it is a good idea to get the last required packages first.
sudo apt-get update
sudo apt-get install netcat lua5.1 openssl libpcre3 dnsmasq
And now we can install Kong
sudo dpkg -i kong-0.3.2.*.deb
I can be reached at [email protected].
thanks! very helpfull. though when i ran
but cassandra started just fine