Skip to content

Instantly share code, notes, and snippets.

@steventen
Last active December 13, 2015 22:09
Show Gist options
  • Save steventen/4982858 to your computer and use it in GitHub Desktop.
Save steventen/4982858 to your computer and use it in GitHub Desktop.
install ruby rails, and mysql on ubuntu 12.04
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libpcre3-dev
apt-get -y install curl git-core python-software-properties
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz
tar -xvzf ruby-1.9.3-p362.tar.gz
cd ruby-1.9.3-p362/
./configure --prefix=/usr/local
make
make install
#sudo gem install chef ruby-shadow --no-ri --no-rdoc
gem install rails --no-ri --no-rdoc
gem install bundler --no-ri --no-rdoc
echo "deb http://nginx.org/packages/ubuntu/ precise nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/ubuntu/ precise nginx" | sudo tee -a /etc/apt/sources.list
apt-get -y update
apt-get -y --force-yes install nginx
apt-get -y install mysql-server
#sudo visudo
groupadd -g 106 admin
adduser deployer --ingroup admin
su deployer
add-apt-repository ppa:chris-lea/node.js
apt-get -y update
apt-get -y install nodejs
ssh git@github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment