I agree with "Martin F" -- he described the simplest and proven way to upgrade Nginx from the official sources.
However, some people would like to go "Debian way" of installing source packages. In this case, the scenario is as follows:
- You must have
- Go to the directory where you build packages, e.g.
/usr/src. Download Nginx package sources:
apt-get source nginx=1.0.4
nginx-1.0.4 contains Nginx sources along with Debian package configuration, installation script, etc. If you just want to add another option to Nginx configuration command line, edit
debian/rules file. Note that Nginx package comes in three flavors:
full and I don't remember the third. Choose whatever you like and modify its configuration.
- Update the ChangeLog:
dch --local your-user-id 'Added perl module; Removed ipv6, mail, xslt modules'
- Build the package:
debuild -us -uc -b
After this, you should have Debian packages (e.g.
/usr/src. Just install the package of your choice with
dpkg -i <file>