Skip to content

Instantly share code, notes, and snippets.

@sourcepirate
Forked from montanaflynn/install.md
Created October 24, 2018 14:35
Show Gist options
  • Save sourcepirate/dd7f4a53413633059cfd470c04b3971c to your computer and use it in GitHub Desktop.
Save sourcepirate/dd7f4a53413633059cfd470c04b3971c to your computer and use it in GitHub Desktop.
Quickly install Kong on Ubuntu 14.04

Install Java, Cassandra & Kong on Ubuntu 14.04

sudo apt-get install -y wget
wget -O kong-install.sh http://git.io/vmMjv
cat kong-install.sh
chmod +x kong-install.sh
sudo ./kong-install.sh
source ~/.bash_profile
sudo cassandra
sudo kong start
# Get things ready
apt-get update
apt-get install -y software-properties-common wget curl
# Install Java
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
add-apt-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
# Install Cassandra
CASSANDRA_VERSION='2.1.8'
CASSANDRA_PATH="cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz"
CASSANDRA_DOWNLOAD='http://www.apache.org/dyn/closer.cgi?path=/${CASSANDRA_PATH}&as_json=1'
CASSANDRA_MIRROR=`curl -s ${CASSANDRA_DOWNLOAD} | grep -oP "(?<=\"preferred\": \")[^\"]+"`
wget $CASSANDRA_MIRROR$CASSANDRA_PATH
tar -zxf apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz
mv apache-cassandra-${CASSANDRA_VERSION} /usr/local/cassandra
mkdir /var/lib/cassandra && mkdir /var/log/cassandra
echo 'CASSANDRA_HOME=/usr/local/cassandra' >> ~/.bash_profile
echo 'PATH=$PATH:$CASSANDRA_HOME/bin' >> ~/.bash_profile
# Install Kong
KONG_VERSION='0.4.0'
wget https://github.com/Mashape/kong/releases/download/${KONG_VERSION}/kong-${KONG_VERSION}.trusty_all.deb
apt-get update
dpkg -i kong-${KONG_VERSION}.*.deb
apt-get install -fy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment