Created
September 12, 2012 12:59
-
-
Save statique/3706424 to your computer and use it in GitHub Desktop.
Setup Ubuntu 12.04 Web Server for NGINX Rails RBEnv Postgres Memcache
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
apt-get update | |
apt-get upgrade | |
apt-get -y install curl git-core python-software-properties | |
# nginx | |
add-apt-repository ppa:nginx/stable | |
apt-get -y update | |
apt-get -y install nginx | |
service nginx start | |
# PostgreSQL client | |
add-apt-repository ppa:pitti/postgresql | |
apt-get -y update | |
apt-get -y install libpq-dev | |
# Node.jsadd-apt-repository ppa:chris-lea/node.js | |
apt-get -y update | |
apt-get -y install nodejs | |
# Memcached | |
apt-get -y install memcached | |
# Install Firewall | |
apt-get -y install ufw | |
ufw enable | |
ufw allow 22 | |
ufw allow 80 | |
# Add deployer user | |
adduser deployer --ingroup sudo | |
su deployer | |
cd# rbenvcurl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
nano ~/.bashrc | |
# start bashrc, add before $PS1 | |
if [ -d "${RBENV_ROOT}" ]; then | |
export PATH="${RBENV_ROOT}/bin:${PATH}" | |
eval "$(rbenv init -)" | |
fi | |
# end bashrc | |
. ~/.bashrcrbenv bootstrap-ubuntu-12-04 | |
rbenv install 1.9.3-p194 | |
rbenv global 1.9.3-p194 | |
echo "---" > ~/.gemrc | |
echo ":verbose: true" >> ~/.gemrc | |
echo ":bulk_threshold: 1000" >> ~/.gemrc | |
echo "install: --no-ri --no-rdoc --env-shebang" >> ~/.gemrc | |
echo ":sources:" >> ~/.gemrc | |
echo "- http://gems.rubyforge.org/" >> ~/.gemrc | |
echo ":benchmark: false" >> ~/.gemrc | |
echo ":backtrace: false" >> ~/.gemrc | |
echo "update: --no-ri --no-rdoc --env-shebang" >> ~/.gemrc | |
echo ":update_sources: true" >> ~/.gemrc | |
gem update --system | |
gem install bundler | |
rbenv rehash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment