Monthly Archives: November 2009

Installing Nginx from source Ubuntu Server 9.10

0
Filed under Linux, Programming, Projects, Servers, Tech

Distro: Ubuntu 9.10 Server

First install the build-essential package

sudo apt-get install build-essential

Then download the source code, v. 0.7.63 was the current stable version as of writing this post.

wget http://sysoev.ru/nginx/nginx-0.7.63.tar.gz

Extract the source code

tar zxvf nginx-0.7.63.tar.gz

Enter the directory

cd nginx-0.7.63

Configure the build, I enabled the flv streaming and zip modules.

./configure --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --user=www-data --group=www-data --with-http_flv_module --with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/tmp/nginx/proxy/

If you find that there are errors with the pcre and openssl packages run the following command to install the deps.

sudo apt-get install libssl-dev libpcre3-dev

Now compile the source code

make

Install the binaries

sudo make install

You are finished! I plan on covering how to setup nginx to serve static content and proxy php requests to apache.