(ve):Install Lighttpd on Debian 5.0

  • This page was last modified on November 22, 2010, at 10:43.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Contents

lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other web servers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect web server-software for every server that suffers load problems.

I highly recommend installing this over apache if you have the 512mb package as it will use 1/3 the memory and space as apache, if your prepared to do some reading lighttpd has all the features you'd find in apache and also you can extend everything with Lua scripts!

Install

To install you have 2 options, first:

aptitude install lighttpd lighttpd-doc

All done!

Option two: The default version is quite old and is missing some great features that have been implemented since. To install the latest version we're going to have to get the latest testing package(not commit rate, but not perfectly stable). Login as root for this and make sure you have apache or any other services like apache2-common REMOVED before you start(only removing "apache2" is not enough and you wont be able to bind to port 80, use synaptic if your having issues. --Install_VNC_on_Ubuntu_9.10).

First lets add the testing rep to the sources list:

nano /etc/apt/sources.list

Now add the following line to the end of the file:

deb-src http://ftp.at.debian.org/debian/ testing main

Save that and exit back to tty, next is to update package db:

aptitude update

Then we need to install devscripts so we can build our source into a deb package ready to be installed just like any other app:

aptitude install devscripts

If that installed correctly we now need to setup a directory structure so we don't make a mess of our home folder:

mkdir backports
mkdir quilt
cd quilt

What is quilt? It's a tool used to manage packages but the current version wont be able to read the package we create so lets install that now:

apt-get build-dep quilt
apt-get source quilt

After those two commands do a ls to see what folders have been created, you'll then need to cd into that e.g. cd quilt-0.48

debuild -us -uc
cd ..
dpkg -i quilt_0.48-6_all.deb

OK! If everything went smoothly your in luck because that was the hardest part, to install Lighttpd we just do the same thing again:

cd ~/backports
mkdir lighttpd
cd lighttpd
apt-get build-dep lighttpd
apt-get source lighttpd
cd lighttpd-1.4.26-1
debuild -us -uc
cd ..

One more thing, unless you are in fact using a full ipv6 network and want only ipv6 users to view your site open up lighttpd.conf and comment out include_shell "/usr/share/lighttpd/use-ipv6.pl". Now just type (you'll need to ls here to find the exact filename):

dpkg -i lighttpd_1.4.26-1.1_all.deb

Done!