Start by setting the timezone
$ dpkg-reconfigure tzdata
Install required packages
$ aptitude install git-core gcc g++ make psmisc autoconf
Fix locales
$ aptitude install locales
$ dpkg-reconfigure locales
$ vim /etc/environment
Put this in:
LANG=en_GB.UTF-8
LC_ALL=en_GB.UTF-8
MySQL install
$ aptitude install mysql-server mysql-client libmysqlclient15-dev
XML & XSLT
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
$ tar -xvf libxml2-2.7.8.tar.gz
$ ./configure --prefix=/usr/local
$ make && make install
$ wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
$ tar -xvf libxslt-1.1.26.tar.gz
$ ./configure --prefix=/usr/local --with-libxml-prefix=/usr/local
$ make && make install
Utility packages (or something)
$ aptitude install bison re2c libbz2-dev libpcre3-dev libssl-dev zlib1g-dev libmcrypt-dev libmhash-dev libmhash2 libpq-dev libpq5 libsasl2-dev libopenjpeg-dev libjpeg62-dev libpng12-dev libtiff4-dev libjpeg-progs optipng libxml2-dev libxslt1-dev libyaml-dev
cURL
$ wget http://curl.haxx.se/download/curl-7.22.0.tar.gz
$ tar -xvf curl-7.22.0.tar.gz
$ ./configure && make && make install
ImageMagick
$ wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
$ tar -xvf ImageMagick.tar.gz
$ ./configure && make && make install
$ ldconfig /usr/local/lib
Ruby
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar -xvf ruby-1.9.3-p0.tar.gz
$ ./configure && make && make install
Gems
$ gem install nokogiri -- --with-xml2-include=/usr/local/include/libxml2 --with-xml2-lib=/usr/local/lib --with-xslt-dir=/usr/local
Nginx
$ wget http://nginx.org/download/nginx-1.0.10.tar.gz
$ tar -xvf nginx-1.0.10.tar.gz
$ ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_gzip_static_module
$ make && make install
Nginx init.d script
Follow this: http://articles.slicehost.com/2007/10/17/ubuntu-lts-adding-an-nginx-init-script