Skip to content

Instantly share code, notes, and snippets.

@Fatman13
Forked from johnrees/_ubuntu_steps.sh
Created September 10, 2013 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fatman13/6513037 to your computer and use it in GitHub Desktop.
Save Fatman13/6513037 to your computer and use it in GitHub Desktop.
# As root user
sudo su
# Update the OS
apt-get update -y
# Add this to ~/.bashrc to remove timezone warnings
export LC_ALL="en_US.UTF-8"
source ~/.bashrc
# Install Rails Requirements w/ NGINX & NODE repo
apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y
# Add Nginx and Node
add-apt-repository ppa:nginx/stable
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install nginx nodejs -y
sudo service nginx restart
# Install Firewall
apt-get install ufw -y
ufw enable
ufw allow 22
ufw allow 80
# Add Deployment User
groupadd admin
adduser deployer --ingroup admin
su deployer
# logout
# ssh-copy-id keys to server
# login as deployer
# Say hello to git
ssh git@github.com
# Install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
exec $SHELL -l
# Install Ruby build
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv rehash
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
# Check installation went OK
ruby -v
# Install Bundler
vim ~/.gemrc
gem: --no-ri --no-rdoc
gem install bundler
rbenv rehash
# ...
# Install postgres, redis, varnish etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment