Last active
August 18, 2016 08:50
-
-
Save OleksandrPoltavets/09b44be04907508e4b27d94ad1c149e0 to your computer and use it in GitHub Desktop.
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
ssh root@new_server_ip | |
apt-get -y update | |
apt-get -y install curl git-core python-software-properties | |
wget http://nginx.org/keys/nginx_signing.key | |
apt-key add nginx_signing.key | |
vim /etc/apt/sources.list | |
ADD: | |
deb http://nginx.org/packages/ubuntu/ codename nginx | |
deb-src http://nginx.org/packages/ubuntu/ codename nginx | |
apt-get install nginx | |
service nginx start | |
apt-get install postgresql postgresql-contrib libpq-dev | |
sudo -u postgres psql | |
postgres=# \password | |
postgres=# create user myapp with password 'password'; | |
postgres=# create database myapp_production owner myapp; | |
apt-get -y install telnet postfix | |
# START nodeJS installation (may need for rails apps) # | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get -y update | |
apt-get -y install nodejs | |
# END nodeJS # | |
adduser deployer | |
visudo | |
# User privilege specification | |
root ALL=(ALL:ALL) ALL | |
deployer ALL=(ALL:ALL) ALL | |
su deployer | |
cd | |
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
vim ~/.bashrc | |
# for examples | |
export RBENV_ROOT="${HOME}/.rbenv" | |
if [ -d "${RBENV_ROOT}" ]; then | |
export PATH="${RBENV_ROOT}/bin:${PATH}" | |
eval "$(rbenv init -)" | |
fi | |
. ~/.bashrc | |
rbenv bootstrap-ubuntu-12-04 | |
rbenv install 2.3.1 | |
rbenv global 2.3.1 | |
ruby -v | |
gem install bundler --no-ri --no-rdoc | |
rbenv rehash | |
bundle -v | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment