Created
September 5, 2013 14:47
-
-
Save pelgrim/6451154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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