This tutorial was preformed using Ubuntu 8.04 LTS
$ ssh root@12.12.12.12 (your IP address)
$ apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev vim wget curl $ apt-get -y install mysql-server libmysqlclient15-dev mysql-client
$ adduser demo $ visudo
Add to the end of the file:
demo ALL=(ALL) ALL)
$ mkdir ~/.ssh $ ssh-keygen -t rsa $ scp ~/.ssh/id_rsa.pub demo@12.12.12.12:~
$ mkdir /home/demo/.ssh $ mv /home/demo/id_rsa.pub /home/demo/.ssh/authorized_keys $ chown -R demo:demo /home/demo/.ssh $ chmod 700 /home/demo/.ssh $ chmod 600 /home/demo/.ssh/authorized_keys
Edit the SSH configuration.
$ sudo vim /etc/ssh/sshd_config
PermitRootLogin no
X11Forwarding no
UsePAM no
UseDNS no
AllowUsers demo
$ sudo /etc/init.d/ssh restart $ ssh demo@12.12.12.12
$ sudo locale-gen en_GB.UTF-8 $ sudo /usr/sbin/update-locale LANG=en_GB.UTF-8
$ sudo apt-get install tcl8.4 tk8.4 $ cd ~/temp\ $ wget kernel.org/pub/software/scm/git/git-1.6.3.1.tar.gz $ tar xzvf git-1.6.3.1.tar.gz $ cd git-1.6.3.1 $ ./configure $ make $ sudo make install $ sudo ln -s /usr/local/bin/git /usr/bin/git
$ mkdir ~/temp && cd ~/temp $ wget rubyforge.org/frs/download.php/57097/ruby-enterprise-1.8.6-20090520.tar.gz $ tar xzvf ruby-enterprise-1.8.6-20090520.tar.gz $ sudo ./ruby-enterprise-1.8.6-20090520/installer $ export PATH=/opt/ruby-enterprise-1.8.6-20090520/bin:$PATH $ sudo /opt/ruby_ee/bin/passenger-install-nginx-module
$ sudo useradd -s /sbin/nologin -r www-data $ sudo usermod -a -G www-data demo
$ mkdir ~/public_html $ mkdir ~/public_html/01_project
$ sudo su $ chgrp -R www-data ~/public_html/ $ chmod -R 2750 ~/public_html/
$ mkdir /opt/nginx/sites-available $ mkdir /opt/nginx/sites-enabled $ wget railsgeek.com/vps/vhost01 -P /opt/nginx/sites-available $ ln -s /opt/nginx/sites-available/vhost01 /opt/nginx/sites-enabled
$ wget railsgeek.com/vps/nginx.conf -P /opt/nginx/conf $ wget railsgeek.com/vps/nginx -P /etc/init.d $ chmod +x /etc/init.d/nginx $ /etc/init.d/nginx start
Discussion
Regarding the git portion, I had to run ./configure before running make.
Thanks Daniel. I've added it to the page.