Skip to content

Instantly share code, notes, and snippets.

@pelgrim
Created September 5, 2013 14:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pelgrim/6451154 to your computer and use it in GitHub Desktop.
Save pelgrim/6451154 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Ruby
useradd -d /home/app -m -s /bin/bash app
apt-get update
apt-get -y install git curl
su - app
git clone https://github.com/sstephenson/rbenv .rbenv
git clone https://github.com/sstephenson/ruby-build .rbenv/plugins/ruby-build
git clone https://github.com/fesplugas/rbenv-bootstrap .rbenv/plugins/rbenv-bootstrap
echo 'PATH="$HOME/.rbenv/bin:$PATH"' >> .profile
echo 'eval "$(rbenv init -)"' >> .profile
exit
/home/app/.rbenv/plugins/rbenv-bootstrap/bin/rbenv-bootstrap-ubuntu-12-04
su - app
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
rbenv rehash
gem install bundler
gem install god
exit
# Mongo
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
apt-get update
apt-get -y install mongodb-10gen
iptables -A INPUT ! -i lo -p tcp --dport 27017 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment