Debianized Source Install

James Robertson j at mesrobertson.com
Tue Feb 3 05:10:46 MSK 2009


I am running Debian Lenny but want to use the latest stable version of nginx 
but have it "debianized" so all the startup scripts, logrotate, conf files 
etc are in the locations that installing from a debian package would provide.

I have come up with the following and was wondering if anyone can see any 
problems with it.

aptitude install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev 
zlib1g-dev
aptitude install nginx # Installs version 6.32
cd /usr/src/
wget http://sysoev.ru/nginx/nginx-0.6.35.tar.gz
tar zxvf nginx-0.6.35.tar.gz
cd nginx-0.6.35
# The following uses the same config that the debian package uses.
./configure --sbin-path=/usr/sbin/nginx \
            --with-http_ssl_module \
            --prefix=/etc/nginx \
            --conf-path=/etc/nginx/nginx.conf \
            --user=www-data \
            --group=www-data \
            --error-log-path=/var/log/nginx/error.log \
            --http-log-path=/var/log/nginx/access.log \
            --pid-path=/var/run/nginx.pid \
            --http-client-body-temp-path=/var/lib/nginx/body \
            --http-proxy-temp-path=/var/lib/nginx/proxy \
            --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
make
mv /usr/sbin/nginx /usr/sbin/nginx.debian
mv objs/nginx /usr/sbin/
/etc/init.d/nginx restart
aptitude hold nginx

Basically it just replaces the nginx binary with the updated version and uses 
the default debian configuration to operate from.  It seems to run OK.

When updated versions are released I just run the ./configure and make and 
replace the nginx binary.

Thanks,

James





More information about the nginx mailing list