Skip to content

Instantly share code, notes, and snippets.

@myabc myabc/gist:6874053 forked from tonyc/gist:5989308
Last active Dec 24, 2015

Embed
What would you like to do?
#/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 htop vim-nox imagemagick
wget -O chruby-0.3.6.tar.gz https://github.com/postmodern/chruby/archive/v0.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 https://github.com/postmodern/ruby-install/archive/v0.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-p247
echo "source /usr/local/share/chruby/chruby.sh" >> /etc/profile.d/chruby.sh && chmod u+x /etc/profile.d/chruby.sh
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/nginx.pid;" >> /opt/nginx/conf/nginx.conf
curl -o /etc/init.d/nginx https://gist.github.com/tonyc/1405605/raw/325c5f9c0246f079f569a1e3e6c2dffaf18e96c9/gistfile1.txt
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
/etc/init.d/nginx start
exit
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.