Skip to content

Instantly share code, notes, and snippets.

@mystix
Created March 21, 2011 14:00
Show Gist options
  • Select an option

  • Save mystix/879480 to your computer and use it in GitHub Desktop.

Select an option

Save mystix/879480 to your computer and use it in GitHub Desktop.

Revisions

  1. mystix revised this gist Oct 2, 2011. 2 changed files with 4 additions and 4 deletions.
    4 changes: 4 additions & 0 deletions passenger-nginx-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    # install rvm
    bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)


    # install ruby 1.9.2 + some global gems
    rvm install 1.9.2
    rvm use 1.9.2@global
    4 changes: 0 additions & 4 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -54,10 +54,6 @@ sudo aptitude update
    sudo aptitude -y install postgresql libpq-dev


    # install rvm
    bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)


    # download + unzip nginx source
    wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -O- | tar xz

  2. mystix revised this gist Oct 2, 2011. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions passenger-nginx-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,16 @@
    # install ruby 1.9.2 + some global gems
    rvm install 1.9.2
    rvm use 1.9.2@global
    gem install awesome_print map_by_method wirble bundler builder pg cheat
    gem install -v2.1.2 builder


    # install Rails
    rvm gemset create rails3
    rvm use 1.9.2@rails3 --default
    gem install rails


    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support
  3. mystix revised this gist Oct 2, 2011. 1 changed file with 0 additions and 13 deletions.
    13 changes: 0 additions & 13 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -58,19 +58,6 @@ sudo aptitude -y install postgresql libpq-dev
    bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)


    # install ruby 1.9.2 + some global gems
    rvm install 1.9.2
    rvm use 1.9.2@global
    gem install awesome_print map_by_method wirble bundler builder pg cheat
    gem install -v2.1.2 builder


    # install Rails
    rvm gemset create rails3
    rvm use 1.9.2@rails3 --default
    gem install rails


    # download + unzip nginx source
    wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -O- | tar xz

  4. mystix revised this gist Oct 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion passenger-nginx-setup.sh
    Original file line number Diff line number Diff line change
    @@ -14,5 +14,5 @@ sudo /etc/init.d/nginx stop
    sudo /usr/sbin/update-rc.d -f nginx defaults


    # remind user to setup rvm group -- run "rvm notes" for more info
    # remind user to setup rvm group -- run "rvm requirements" for more info
    echo Remember to add new sudo user to "rvm" group as well.
  5. mystix revised this gist Oct 2, 2011. 2 changed files with 18 additions and 18 deletions.
    18 changes: 18 additions & 0 deletions passenger-nginx-setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support


    # configure nginx startup script
    sudo mkdir /opt/nginx/init.d
    sudo wget --no-check-certificate https://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx
    sudo chmod +x /opt/nginx/init.d/nginx
    sudo ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    sudo /etc/init.d/nginx start
    sudo /etc/init.d/nginx status
    sudo /etc/init.d/nginx stop
    sudo /usr/sbin/update-rc.d -f nginx defaults


    # remind user to setup rvm group -- run "rvm notes" for more info
    echo Remember to add new sudo user to "rvm" group as well.
    18 changes: 0 additions & 18 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -75,24 +75,6 @@ gem install rails
    wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -O- | tar xz


    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support


    # configure nginx startup script
    sudo mkdir /opt/nginx/init.d
    sudo wget --no-check-certificate https://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx
    sudo chmod +x /opt/nginx/init.d/nginx
    sudo ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    sudo /etc/init.d/nginx start
    sudo /etc/init.d/nginx status
    sudo /etc/init.d/nginx stop
    sudo /usr/sbin/update-rc.d -f nginx defaults



    # setup new group "wheel" for sudo users
    echo Refer to http://articles.slicehost.com/2010/10/18/ubuntu-maverick-setup-part-1#newuser
    echo to setup new "wheel" group + sudo users.
    echo Remember to add new sudo user to "rvm" group as well.
  6. mystix revised this gist Oct 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ gem: --no-ri --no-rdoc
    sudo apt-get install aptitude


    # add 3rd-party repos + update ubuntu
    # update ubuntu repos
    sudo aptitude update
    sudo aptitude -y dist-upgrade

  7. mystix revised this gist Oct 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ gem: --no-ri --no-rdoc


    # install aptitude
    apt-get install aptitude
    sudo apt-get install aptitude


    # add 3rd-party repos + update ubuntu
  8. mystix revised this gist Oct 2, 2011. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,6 @@ apt-get install aptitude


    # add 3rd-party repos + update ubuntu
    sudo add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    sudo aptitude update
    sudo aptitude -y dist-upgrade

    @@ -50,6 +49,8 @@ sudo iptables-save # save updated iptables configuration


    # install PostgreSQL
    sudo add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    sudo aptitude update
    sudo aptitude -y install postgresql libpq-dev


  9. mystix revised this gist Oct 2, 2011. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,10 @@ gem: --no-ri --no-rdoc
    :backtrace: false' > ~/.gemrc


    # install aptitude
    apt-get install aptitude


    # add 3rd-party repos + update ubuntu
    sudo add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    sudo aptitude update
  10. mystix revised this gist Oct 2, 2011. 1 changed file with 22 additions and 23 deletions.
    45 changes: 22 additions & 23 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # run this script on a fresh Ubuntu server installation as root
    # run this script on a fresh Ubuntu server installation as non-root user


    # version numbers for various packages
    @@ -22,32 +22,31 @@ gem: --no-ri --no-rdoc
    :backtrace: false' > ~/.gemrc


    # update ubuntu
    aptitude update
    aptitude -y dist-upgrade
    # add 3rd-party repos + update ubuntu
    sudo add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    sudo aptitude update
    sudo aptitude -y dist-upgrade


    # setup rvm / postgresql / nginx pre-requisites + useful libraries
    aptitude -y install build-essential git curl vim rdate htop python-software-properties
    sudo aptitude -y install build-essential git curl vim rdate htop python-software-properties


    # install recommended dependencies as suggested by `rvm notes`
    aptitude -y install bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev
    sudo aptitude -y install bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev


    # install + configure sshguard
    aptitude install sshguard
    iptables -N sshguard # for regular IPv4 support
    ip6tables -N sshguard # for IPv6 support as well
    iptables -A INPUT -j sshguard # block any IPv4 traffic from abusers
    ip6tables -A INPUT -j sshguard # block any IPv6 traffic from abusers
    iptables-save # save updated iptables configuration
    sudo aptitude install sshguard
    sudo iptables -N sshguard # for regular IPv4 support
    sudo ip6tables -N sshguard # for IPv6 support as well
    sudo iptables -A INPUT -j sshguard # block any IPv4 traffic from abusers
    sudo ip6tables -A INPUT -j sshguard # block any IPv6 traffic from abusers
    sudo iptables-save # save updated iptables configuration


    # install PostgreSQL
    add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    aptitude update
    aptitude -y install postgresql libpq-dev
    sudo aptitude -y install postgresql libpq-dev


    # install rvm
    @@ -77,14 +76,14 @@ passenger-install-nginx-module # press Enter to accept, then choose option 2 in


    # configure nginx startup script
    mkdir /opt/nginx/init.d
    wget --no-check-certificate https://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx
    chmod +x /opt/nginx/init.d/nginx
    ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    /etc/init.d/nginx start
    /etc/init.d/nginx status
    /etc/init.d/nginx stop
    /usr/sbin/update-rc.d -f nginx defaults
    sudo mkdir /opt/nginx/init.d
    sudo wget --no-check-certificate https://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx
    sudo chmod +x /opt/nginx/init.d/nginx
    sudo ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    sudo /etc/init.d/nginx start
    sudo /etc/init.d/nginx status
    sudo /etc/init.d/nginx stop
    sudo /usr/sbin/update-rc.d -f nginx defaults



  11. mystix revised this gist Oct 2, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,8 @@
    NGINX_VERSION=1.0.8

    # copy public ssh key to server's authorized_keys keychain for simple ssh logins
    mkdir -p ~/.ssh
    echo -e '<your ssh public key here>' > ~/.ssh/authorized_keys
    #mkdir -p ~/.ssh
    #echo -e '<your ssh public key here>' > ~/.ssh/authorized_keys


    # setup .gemrc
  12. mystix renamed this gist Oct 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh → ubuntu-setup.sh
    Original file line number Diff line number Diff line change
    @@ -51,7 +51,7 @@ aptitude -y install postgresql libpq-dev


    # install rvm
    bash < <(curl -B http://rvm.beginrescueend.com/install/rvm)
    bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)


    # install ruby 1.9.2 + some global gems
  13. mystix revised this gist Oct 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@


    # version numbers for various packages
    NGINX_VERSION=0.8.54
    NGINX_VERSION=1.0.8

    # copy public ssh key to server's authorized_keys keychain for simple ssh logins
    mkdir -p ~/.ssh
  14. mystix revised this gist Oct 2, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -41,6 +41,7 @@ iptables -N sshguard # for regular IPv4 support
    ip6tables -N sshguard # for IPv6 support as well
    iptables -A INPUT -j sshguard # block any IPv4 traffic from abusers
    ip6tables -A INPUT -j sshguard # block any IPv6 traffic from abusers
    iptables-save # save updated iptables configuration


    # install PostgreSQL
  15. mystix revised this gist Oct 2, 2011. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,14 @@ aptitude -y install build-essential git curl vim rdate htop python-software-prop
    aptitude -y install bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev


    # install + configure sshguard
    aptitude install sshguard
    iptables -N sshguard # for regular IPv4 support
    ip6tables -N sshguard # for IPv6 support as well
    iptables -A INPUT -j sshguard # block any IPv4 traffic from abusers
    ip6tables -A INPUT -j sshguard # block any IPv6 traffic from abusers


    # install PostgreSQL
    add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    aptitude update
  16. mystix revised this gist Mar 26, 2011. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -78,9 +78,6 @@ ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    /usr/sbin/update-rc.d -f nginx defaults


    # cleanup
    rm -rf nginx-$NGINX_VERSION


    # setup new group "wheel" for sudo users
    echo Refer to http://articles.slicehost.com/2010/10/18/ubuntu-maverick-setup-part-1#newuser
  17. mystix revised this gist Mar 26, 2011. 1 changed file with 2 additions and 12 deletions.
    14 changes: 2 additions & 12 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # run this script on a fresh Ubuntu server installation
    # run this script on a fresh Ubuntu server installation as root


    # version numbers for various packages
    @@ -22,15 +22,6 @@ gem: --no-ri --no-rdoc
    :backtrace: false' > ~/.gemrc


    # setup .bashrc for RVM
    mv ~/.bashrc ~/.bashrc_part2
    echo -e '[[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" # This loads RVM into a shell session.
    if [[ ! -z "PS1" ]] ; then
    source ~/.bashrc_part2
    fi' > ~/.bashrc


    # update ubuntu
    aptitude update
    aptitude -y dist-upgrade
    @@ -51,8 +42,7 @@ aptitude -y install postgresql libpq-dev


    # install rvm
    bash < <( curl -L http://bit.ly/rvm-install-system-wide )
    source ~/.bashrc # source new .bashrc to activate RVM
    bash < <(curl -B http://rvm.beginrescueend.com/install/rvm)


    # install ruby 1.9.2 + some global gems
  18. mystix revised this gist Mar 21, 2011. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -89,4 +89,10 @@ ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx


    # cleanup
    rm -rf nginx-$NGINX_VERSION
    rm -rf nginx-$NGINX_VERSION


    # setup new group "wheel" for sudo users
    echo Refer to http://articles.slicehost.com/2010/10/18/ubuntu-maverick-setup-part-1#newuser
    echo to setup new "wheel" group + sudo users.
    echo Remember to add new sudo user to "rvm" group as well.
  19. mystix revised this gist Mar 21, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -36,8 +36,8 @@ aptitude update
    aptitude -y dist-upgrade


    # setup rvm / postgresql / nginx pre-requisites
    aptitude -y install build-essential git curl vim python-software-properties
    # setup rvm / postgresql / nginx pre-requisites + useful libraries
    aptitude -y install build-essential git curl vim rdate htop python-software-properties


    # install recommended dependencies as suggested by `rvm notes`
  20. mystix revised this gist Mar 21, 2011. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -77,5 +77,16 @@ gem install passenger
    passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support


    # configure nginx startup script
    mkdir /opt/nginx/init.d
    wget --no-check-certificate https://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx
    chmod +x /opt/nginx/init.d/nginx
    ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx
    /etc/init.d/nginx start
    /etc/init.d/nginx status
    /etc/init.d/nginx stop
    /usr/sbin/update-rc.d -f nginx defaults


    # cleanup
    rm -rf nginx-$NGINX_VERSION
  21. mystix revised this gist Mar 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -74,7 +74,7 @@ wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -O- | tar xz

    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module
    passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support


    # cleanup
  22. mystix revised this gist Mar 21, 2011. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    # run this script on a fresh Ubuntu server installation


    # version numbers for various packages
    NGINX_VERSION=0.8.54

    # copy public ssh key to server's authorized_keys keychain for simple ssh logins
    mkdir -p ~/.ssh
    echo -e '<your ssh public key here>' > ~/.ssh/authorized_keys
    @@ -64,6 +68,14 @@ rvm use 1.9.2@rails3 --default
    gem install rails


    # download + unzip nginx source
    wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -O- | tar xz


    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module


    # cleanup
    rm -rf nginx-$NGINX_VERSION
  23. mystix revised this gist Mar 21, 2011. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -64,12 +64,6 @@ rvm use 1.9.2@rails3 --default
    gem install rails


    # download + unzip nginx source
    wget http://nginx.org/download/nginx-0.8.54.tar.gz -O- | tar xz


    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module


  24. mystix revised this gist Mar 21, 2011. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -64,6 +64,10 @@ rvm use 1.9.2@rails3 --default
    gem install rails


    # download + unzip nginx source
    wget http://nginx.org/download/nginx-0.8.54.tar.gz -O- | tar xz


    # install passenger + nginx
    gem install passenger
    passenger-install-nginx-module
  25. mystix revised this gist Mar 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # run this script on a fresh Ubuntu slice @ rackspace
    # run this script on a fresh Ubuntu server installation

    # copy public ssh key to server's authorized_keys keychain for simple ssh logins
    mkdir -p ~/.ssh
  26. mystix revised this gist Mar 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # copy public ssh key to server's authorized_keys keychain for simple ssh logins
    mkdir -p ~/.ssh
    echo '<your ssh public key here>' > ~/.ssh/authorized_keys
    echo -e '<your ssh public key here>' > ~/.ssh/authorized_keys


    # setup .gemrc
  27. mystix revised this gist Mar 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -48,7 +48,7 @@ aptitude -y install postgresql libpq-dev

    # install rvm
    bash < <( curl -L http://bit.ly/rvm-install-system-wide )
    source ~/.bashrc
    source ~/.bashrc # source new .bashrc to activate RVM


    # install ruby 1.9.2 + some global gems
  28. mystix revised this gist Mar 21, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,7 @@ aptitude -y install postgresql libpq-dev

    # install rvm
    bash < <( curl -L http://bit.ly/rvm-install-system-wide )
    source ~/.bashrc


    # install ruby 1.9.2 + some global gems
  29. mystix revised this gist Mar 21, 2011. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,11 @@ if [[ ! -z "PS1" ]] ; then
    fi' > ~/.bashrc


    # update ubuntu
    aptitude update
    aptitude -y dist-upgrade


    # setup rvm / postgresql / nginx pre-requisites
    aptitude -y install build-essential git curl vim python-software-properties

  30. mystix revised this gist Mar 21, 2011. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions ubuntu-rvm.sh
    Original file line number Diff line number Diff line change
    @@ -28,21 +28,21 @@ fi' > ~/.bashrc


    # setup rvm / postgresql / nginx pre-requisites
    aptitude install build-essential git curl vim python-software-properties


    # install rvm
    bash < <( curl -L http://bit.ly/rvm-install-system-wide )
    aptitude -y install build-essential git curl vim python-software-properties


    # install recommended dependencies as suggested by `rvm notes`
    aptitude install bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev
    aptitude -y install bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev


    # install PostgreSQL
    add-apt-repository ppa:pitti/postgresql # install PostgreSQL PPA ((P)ersonal (P)ackage (A)rchive)
    aptitude update
    aptitude install postgresql libpq-dev
    aptitude -y install postgresql libpq-dev


    # install rvm
    bash < <( curl -L http://bit.ly/rvm-install-system-wide )


    # install ruby 1.9.2 + some global gems