Skip to content

Instantly share code, notes, and snippets.

@drewkerrigan
Last active September 17, 2015 20:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewkerrigan/94d82c2ac08dfcad488e to your computer and use it in GitHub Desktop.
Save drewkerrigan/94d82c2ac08dfcad488e to your computer and use it in GitHub Desktop.
Compile relocatable release on Ubuntu

Instructions

sudo su ubuntu
sudo -s
apt-get install -y git
git clone https://gist.github.com/94d82c2ac08dfcad488e.git riak_relocatable
cd riak_relocatable
chmod 755 build.sh
./build.sh

This should result in a riak-2.1.1.tar.gz file getting created in the $HOME directory.

#!/bin/bash
apt-get -y update
apt-get -y upgrade
apt-get -y install make git gcc g++ curl
apt-get -y install python-dev libcppunit-dev libunwind8-dev autoconf autotools-dev libltdl-dev libtool autopoint libcurl4-openssl-dev libsasl2-dev
apt-get -y install openjdk-7-jdk zookeeperd default-jre python-setuptools python-protobuf
apt-get -y install libprotobuf-dev protobuf-compiler
# Install Erlang
apt-get -y update
apt-get -y upgrade
apt-get install -y build-essential autoconf libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev libpam0g-dev
mkdir -p $HOME/bin
cd $HOME/bin
curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl
chmod a+x kerl
./kerl build git git://github.com/basho/otp.git OTP_R16B02_basho8 R16B02-basho8
./kerl install R16B02-basho8 ~/erlang/R16B02-basho8
. ~/erlang/R16B02-basho8/activate
echo '# Erlang' >> $HOME/.bashrc
echo '. $HOME/erlang/R16B02-basho8/activate' >> $HOME/.bashrc
echo 'export PATH=$PATH:$HOME/bin' >> $HOME/.bashrc
cd $HOME
curl -C - -O -L http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/riak-2.1.1.tar.gz
tar -xvf riak-2.1.1.tar.gz
cd riak-2.1.1 && make rel
cd $HOME && tar -C riak-2.1.1/rel/ -czf riak-2.1.1.tar.gz riak
# Fix permissions
chown -R ubuntu $HOME
chgrp -R ubuntu $HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment