Debianized Source Install

Merlin merlin at mahalo.com
Tue Feb 3 22:48:05 MSK 2009


If you have to maintain debian systems and want debianized packages that are
custom, it is really simple to customize the source package and a bit more
work to build your own from scratch.

This can be done with any debian package and you can find out a lot more
about it within the debian community and their documentation.  Essentially,
all you need to know is that you can use 'apt-get source' to return the
debian source package and build with dpkg-build.

Generally you should build everything as normal users and use fakeroot.  If
you want to build a completely custom debian package from any source tar.gz
(such as nginx's), you can use a program called 'dh_make'.

Google should be able to direct you to plenty of relevent documentation and
tutorials.  If you need further help, try a debian community resource (and
brace yourself).

On Mon, Feb 2, 2009 at 6:10 PM, James Robertson <j at mesrobertson.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090203/5f27e600/attachment.html>


More information about the nginx mailing list