Skip to content

Instantly share code, notes, and snippets.

@eng
Created February 26, 2014 02:15
Show Gist options
  • Save eng/9222151 to your computer and use it in GitHub Desktop.
Save eng/9222151 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Security
sudo adduser deploy --ingroup sudo
su deploy
cd ~
# Exit immediately upon error
set -e
set -x
# Pre-install
alias ag="sudo env DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get --force-yes -qyu"
ag update
ag upgrade
# Apt packages
ag install curl build-essential libyaml-dev libsqlite3-dev libxml2-dev libxslt1-dev autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev libcurl4-openssl-dev git-core nodejs mysql-server mysql-client libmysqlclient-dev redis-server openjdk-7-jre-headless imagemagick wkhtmltopdf hunspell hunspell-tools
# Ruby
# cp /site/provision/ruby-1.9.3-p429.tar.gz .
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz
tar xzvf ruby-1.9.3-p429.tar.gz
cd ruby-1.9.3-p429 && ./configure --prefix=/usr/local && make && sudo make install
# Bundler/Passenger
echo 'gem: --no-ri --no-rdoc' > ~/.gemrc
sudo gem install bundler
sudo gem install passenger
sudo passenger-install-nginx-module --auto --auto-download --prefix=/opt/nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment