-
-
Save jcowhigjr/8309659 to your computer and use it in GitHub Desktop.
RAILS Stack build steps
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
# from ubuntu trusty 13.10 | |
# 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 Postgresql 9.3 | |
# alternatively add a repo here http://wiki.postgresql.org/wiki/Apt#PostgreSQL_packages_for_Debian_and_Ubuntu | |
apt-get update | |
apt-get -y install postgresql libpq-dev | |
## Setting postgresql | |
sudo -u postgres psql | |
\password ## set password for login postgres | |
create user <appname> with password 'secret'; #FIXME | |
create database <appname>_production owner <appname>; | |
# Install telnet postfix | |
apt-get install telnet postfix #telnet really? | |
# 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 | |
apt-get install rbenv rubybuild | |
#rbenv bootstrap-ubuntu-13.10 | |
# Install ruby | |
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 | |
# ... | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment