Installing Nginx on Ubuntu Dapper (LTS 6.06)

November 15, 2007

There is a great slicehost article which goes into more detail than this. But the following script will install it from source in one go!.

#!/bin/bash

sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev
wget http://sysoev.ru/nginx/nginx-0.5.33.tar.gz
tar -zxvf nginx-0.5.33.tar.gz
cd nginx-0.5.33
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
make
sudo make install
cd ~
cd sources
sudo wget http://notrocketsurgery.com/files/nginx -O /etc/init.d/nginx
sudo chmod 755 /etc/init.d/nginx
sudo update-rc.d nginx defaults