-
-
Save Fatman13/6513037 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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 [email protected] | |
# 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