-
ssh root@ip.add.re.ss
to SSH into server -
apt-get -y update
To update sources -
apt-get -y upgrade
To upgrade the OS -
To install libraries needed to compile ruby:
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties vim
-
apt-get -y install ruby1.9.3
To install system ruby -
apt-get -y install nodejs
To install nodejs -
echo -e "install: --no-rdoc --no-ri\nupdate: --no-rdoc --no-ri" >> /etc/gemrc
-
gem install passenger
To install passenger -
adduser deploy
To create a new deploy user, homedirectory, and group -
To install init.d script for nginx:
wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh mv init-deb.sh /etc/init.d/nginx chmod +x /etc/init.d/nginx /usr/sbin/update-rc.d -f nginx defaults
ssh deploy@ip.add.re.ss
to SSH into servergit clone git://github.com/sstephenson/rbenv.git ~/.rbenv
To copy rbenvecho 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.profile
To add rbenv to pathecho 'eval "$(rbenv init -)"' >> ~/.profile
To add init and shimsexec $SHELL -l
To restart our shellrbenv rehash
To rebuild shimsgit clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
To install ruby-buildrbenv install 1.9.3-p362
To install the latest version