I thought it was time to write a followup post to, Install Memcached from source on Debian Lenny.
At this moment, Debian provides Nginx 0.6.39 and I was wanting to run Nginx 0.7. The latest stable version is 0.7.64, so I thought I would put together a script to automate the download and installation for me.
Some devoted Debian users will want to string me up for installing a source package, and some others will no doubt say that I'm hating Debian for not using aptitude. These people are entitled to their opinion of course, but I don't feel that there is anything wrong with installing a source package on Debian.
If you feel like installing a package from source makes Debian cry, leave now :)
On my system, my user has write permissions to /usr/local/src so I don't have to run everything under sudo.
You may need to set permissions for your system.
A browser friendly version of the script can be seen at http://gist.github.com/274883.
This script should work on Debian Lenny, and Debian Etch. I think it would also work on Ubuntu.
By the way, I've found gists to be an excellent tool when automating source installs. Using gists makes it wasy to put any kind of script up on the net, as well as supporting config files as so on.
There is a link on that page to the "Raw" version of the script, which the script below will download and execute.
To install, run this command...
# bash -c "`curl http://gist.github.com/raw/274883/e93ec7c38b303b759699e1023c8f6d2e60c93351/install_nginx_on_debian.sh`"
If all goes well, Nginx has been installed, started up, and set to start automatically at boot.You can verify Nginx is running...
# ps -p `cat /var/run/nginx.pid` PID TTY TIME CMD 15004 ? 00:00:00 nginx
Check that Nginx has been set to start at system boot.
# sudo sysv-rc-conf --list nginx nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I'd love to hear if this was useful to you.