-
ssh [email protected]to SSH into server -
apt-get -y updateTo update sources -
apt-get -y upgradeTo 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.3To install system ruby -
apt-get -y install nodejsTo install nodejs -
echo -e "install: --no-rdoc --no-ri\nupdate: --no-rdoc --no-ri" >> /etc/gemrc -
gem install passengerTo install passenger -
adduser deployTo 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 [email protected]to SSH into servergit clone git://github.com/sstephenson/rbenv.git ~/.rbenvTo copy rbenvecho 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.profileTo add rbenv to pathecho 'eval "$(rbenv init -)"' >> ~/.profileTo add init and shimsexec $SHELL -lTo restart our shellrbenv rehashTo rebuild shimsgit clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-buildTo install ruby-buildrbenv install 1.9.3-p362To install the latest version