Ubuntu “Breezy” doesn’t have lighttpd (yet), and the only Ubuntu binaries I could find were (a) stale and (b) compiled for x86. Building lighty from source with the standard configure; make; make install dance works fine, but it forgoes APT… and why would you use Ubuntu if you wanted to avoid APT?
So, here’s how to build lighty from source into a Ubuntu package so it’s all nicely wrapped up and maintained for you. The bonus is that this will also give you the Ubuntu-specific /etc/init.d file and a few other Debian-isms.
First, make sure you have “universe” in your /etc/apt/sources.list (uncomment the “universe” lines if they are commented out).
Next, install some prerequisites:
$ aptitude install libpcre3-dev zlib1g-dev dpkg-dev \
debhelper cdbs libssl-dev \
libbz2-dev libldap2-dev \
libfcgi-dev dpatch patchutils \
libmysqlclient14-dev libfcgi-dev
Then download the lighty sources along with the diff needed for Ubuntu:
$ wget http://lighttpd.net/download/lighttpd-1.4.8.tar.gz $ wget http://diotavelli.net/files/deb/source/lighttpd_1.4.8-1.diff.gz $ tar xzf lighttpd-1.4.8.tar.gz $ gunzip lighttpd_1.4.8-1.diff.gz $ patch -p0 < lighttpd_1.4.8-1.diff
Next, build the package:
$ cd lighttpd-1.4.8 $ chmod +r debian/rules $ dpkg-buildpackage -d
Finally install the .deb you’ve just created:
$ cd .. $ dpkg -i lighttpd_1.4.8-1_amd64.deb
Comments:
The .diff is no longer available. Do you have a copy?
It looks like lighttpd is now in Dapper, so you should use APT to install it from there: http://packages.ubuntu.com/...
The Dapper package uses some changes to /lib/lsb/init-functions that aren't in the Breezy repositories
Discussion and workarounds here:
http://www.ubuntuforums.org...
Backgrounder on lsb init-functions here:
http://lists.debian.org/deb...
Claus -- thanks, that helps a lot.
I ended up using the instructions located here:
http://trac.lighttpd.net/tr...
"Since lighttpd 1.4.8 the debian/ directory was removed to simplify the inclusion into Ubuntu and Debian. If you want to build your own debian package take the debian/ dir from a older release and update the debian/changelog and follow the steps below:"
Leave a comment: