Skip to content

Instantly share code, notes, and snippets.

@tonyc tonyc/gist:5989308
Last active Dec 19, 2015

What would you like to do?
Ubuntu + chruby + ruby-2.0/passenger/nginx/redis stack
#/usr/bin/env bash
set -e
set -x
apt-get update
apt-get upgrade
apt-get -y install build-essential curl git-core openssl libreadline6 libreadline6-dev \
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion libcurl4-openssl-dev \
libpcre3 libpcre3-dev libpq5 libpq-dev htop vim-nox redis-server imagemagick
wget -O chruby-0.3.6.tar.gz
tar -xzvf chruby-0.3.6.tar.gz
cd chruby-0.3.6/
make install
cd ..
wget -O ruby-install-0.2.1.tar.gz
tar -xzvf ruby-install-0.2.1.tar.gz
cd ruby-install-0.2.1/
make install
ruby-install -i /usr/local ruby 2.0.0-p195
echo "source /usr/local/share/chruby/" >> /etc/profile.d/ && chmod u+x /etc/profile.d/
gem install passenger --verbose --no-ri --no-rdoc
passenger-install-nginx-module --prefix=/opt/nginx --auto --auto-download --extra-configure-flags="--with-http_ssl_module"
echo "pid /var/run/;" >> /opt/nginx/conf/nginx.conf
curl -o /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
/etc/init.d/nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.