Mark,<br><br>Why not just use apt-get source to get the source package of nginx; wget the latest nginx; copy the debian/ directory from the source package into the new nginx directory; edit the (dch) changelog, control file, etc; rebuild the package (debuild -rfakeroot), and install with dpkg?<br>
<br>That's what I do, anyway. I recommend similar procedure with any software package -- you can even use dh_make to create the debian/ directory for any particular source directory. Try this guide out: <a href="http://david415.wordpress.com/2008/09/10/customdebianopensshpackagebuild/">http://david415.wordpress.com/2008/09/10/customdebianopensshpackagebuild/</a> which tells you how to make the debian package for latest openssl from scratch - what I mentioned above is how to do it from the existing package, which is what you want in this case because it has all the init.d files and such for you!<br>
<br>There should be plenty of information around the net on building custom debian packages, if you have trouble finding it, try checking out debian-mentors (they have mailing list and IRC).<br><br>- Merlin<br><br><div class="gmail_quote">
On Mon, Mar 23, 2009 at 1:42 PM, Mark Alan <span dir="ltr"><<a href="mailto:varia@e-healthexpert.org">varia@e-healthexpert.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am attaching the procedure that we use to to always have the latest nginx version in Ubuntu/Debian.<br>
<br>
M.<br>
<br>
## -- start-of-procedure<br>
<br>
# Install the current Nginx (Ubuntu 8.10 = Nginx/0.6.34 @ backports)<br>
sudo aptitude -R install nginx= ; # the ending = means install & hold to prevent automatic upgrades<br>
<br>
# install needed ubuntu/debian compiling tools<br>
sudo aptitude -R install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev<br>
<br>
# build & replace by the latest "debianized" Nginx 0.7.44<br>
test -x $HOME/src/ || mkdir -p $HOME/src/ && cd $HOME/src/<br>
# nginx's latest version: <<a href="http://sysoev.ru/nginx/download.html" target="_blank">http://sysoev.ru/nginx/download.html</a>><br>
wget <a href="http://sysoev.ru/nginx/nginx-0.7.44.tar.gz" target="_blank">http://sysoev.ru/nginx/nginx-0.7.44.tar.gz</a><br>
tar zxvf nginx-0.7.44.tar.gz<br>
<br>
cd nginx-0.7.44<br>
./configure --prefix=/etc/nginx \<br>
--sbin-path=/usr/sbin/nginx \<br>
--conf-path=/etc/nginx/nginx.conf \<br>
--error-log-path=/var/log/nginx/error.log \<br>
--pid-path=/var/run/nginx.pid \<br>
--lock-path=/var/lock/nginx.lock \<br>
--user=www-data \<br>
--group=www-data \<br>
--http-log-path=/var/log/nginx/access.log \<br>
--http-client-body-temp-path=/var/lib/nginx/body \<br>
--http-proxy-temp-path=/var/lib/nginx/proxy \<br>
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \<br>
--with-cc-opt=-O2 \<br>
--with-http_gzip_static_module \<br>
--with-http_ssl_module<br>
<br>
# ensure that there is only one -O in CFLAGS and that it is -O2<br>
sed -i '/CFLAGS/s/ \-O //g' objs/Makefile<br>
<br>
make<br>
<br>
# debian policy: use 'install' instead of 'cp' or 'mv'<br>
sudo /usr/bin/install -s -m 755 -o root objs/nginx /usr/sbin/nginx.new && sudo mv /usr/sbin/nginx /usr/sbin/nginx.old-"$(date +%Y%m%d-%H%M-%S)" && sudo mv -v /usr/sbin/nginx.new /usr/sbin/nginx<br>
<br>
sudo kill -15 $(pidof nginx) ; sudo /etc/init.d/nginx restart<br>
<br>
## -- end-of-procedure<br>
<br>
</blockquote></div><br>