GetLighttpd » History » Revision 8
Revision 7 (stbuehler, 2010-01-26 22:35) → Revision 8/23 (nitrox, 2010-01-30 13:00)
{{>toc}}
h1. Source
These are short instructions for experts, for details see [[InstallFromSource]] or try to find binary packages (see below):
h2. Current release
See http://www.lighttpd.net/download or browse http://download.lighttpd.net/lighttpd/
h2. SVN checkout
<pre>
svn checkout svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x/
cd lighttpd-1.4.x
./autogen.sh
</pre>
Then use ./configure and friends. Don't forget to run @./autogen.sh@ after a @svn update@.
h1. Binary packages
On most systems you can install the current lighttpd-1.4.x version via the package management:
h2. Debian based systems
Websites:
* Debian: http://packages.debian.org/source/lighttpd
* Ubuntu: http://packages.ubuntu.com/source/lighttpd
<pre>
aptitude install lighttpd lighttpd-doc
</pre>
Some modules are only available from extra packages (see the website)
h3. Other repositories (may contain more up to date packages, especially for older distributions)
* http://software.opensuse.org/search?baseproject=ALL&p=1&q=lighttpd (openSUSE buildservice), packages for debian stable (i386 + amd64)
Generic hints for sources.list from openSUSE buildservice: http://en.opensuse.org/Build_Service/Deb_builds#Configuring_sources.list
Keys are not exported yet, but you can retrieve them with if you have an account. (Download the key, sudo apt-key add <downloaded-file>)
** http://download.opensuse.org/repositories/server:/http/
<pre>
deb http://download.opensuse.org/repositories/server:/http/Debian_5.0 ./
</pre> Key: https://api.opensuse.org/source/server:http/_pubkey
<pre>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBEeWW0sRBAChmngKj7qkOwxRMALD65OVp+c3ZVNzZ7JpVy79LdWHg5L2Ajkm
nwdtMO3IKJw2NVCsetC4yrm1u9XgmxBsoyTS/5pnrn+ocFBnxxEmbw3x4SEV/ugh
8XujbZekB6loZIEtZPZ1fy4utWsYvCYDhuox1N2ehySzXOp3Ycy69k5+0wCgkoig
Ic5L0a3uRBl3muqbK1yu2/cD/i0EY7LutV8TVG22Q2kZqRjcAqHAtqRcUbweepw/
TTVGvsK6JRx4Iozbzp2aA+7TG+5mfg/vKDv0hDsDmbANtZRXYUtdKpw6MNKZekfu
7ETlhFnzk6afZs8kGEUKuV7ShVE/z7qcU78WBx4JSLFx+e5+K49/T8XNQYl3fnXX
eXUuBACPjZEqYsztoFvCr/NnXwNmD04c9E0gv42hhlm0pdcbnBCItIa1c0suX+ff
I3eXkYxjzCr1KhHOre/cvxmW1ejg1T1P9wNVO1JJnk4HZTWLaimHm31vPsK/LU1A
meBZYwWJhH/8gN4Ode2fHseAeEEjT+15uSU48Gv5Q6QwoQ0XALQ4c2VydmVyOmh0
dHAgT0JTIFByb2plY3QgPHNlcnZlcjpodHRwQGJ1aWxkLm9wZW5zdXNlLm9yZz6I
ZgQTEQIAJgUCR5ZbSwIbAwUJBB6wAAYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ
ELJoDo4I0dizvckAmQEC/HMU1XwZAUbMehTJUt8Y3U6HAJ9R01qOoj3VEouxkyCb
0N0BpmElCYhGBBMRAgAGBQJHlltLAAoJEDswEbdrnWUjt0oAoLMaTjCpyFPM/Z/p
TnL89EaMbiORAJ9E2aUSBZC5UqisFkMvkYv15g9RZQ==
=cO8p
-----END PGP PUBLIC KEY BLOCK-----
</pre>
** http://download.opensuse.org/repositories/home:/stbuehler/
<pre>
deb http://download.opensuse.org/repositories/home:/stbuehler/Debian_5.0 ./
</pre> Key: https://api.opensuse.org/source/home:stbuehler/_pubkey
<pre>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBEfZbxgRBADiVUOYnnsS/ojwNRVEsqMooCJ+U3DXYN7khER5FbbOxxM7ZGOn
rdPFhbzU+k7UwiKR+znRuyKk01wvh0+V8i/+bH8PfTMRPx4gqO9zjLeOugS5jfDC
eMDnn6YRJAXln7RY+AH/AYHnbq4DQ0/3wPc13k0P37+nxhSqWAlvEx6lKwCgkfXB
cWqJAZ368GKg41HK/mlI4wEEAM181Bi80l9jqwP7T7eOc/SK+J6HlYiYYiD1nuxi
jZb1E0JouvXGhBZczkVcT4/wH8XIXtEvqMMGtgMFPiFvPrwGM1Jr16b9VoqSFKmc
6bNwVAkeTGRcUdDntr7/5mJWk58L8qPnhA9XUPjBMN2rDE7PAC1LyHqSMzGlBF5Z
Lin8A/wMykCBapNE4aOcJCTYmPowUXSnZNHj2TF8X2a3/xbL6PWmujgg9W9aptIN
rCwi8l6klALZhZOQACYny2PzpfofCMAs8YIK4Yo+il+d3E0sJ0l9M8jUz/9A31JC
CnUN/ABSkebzofNQ/cVgWKSh47u20aBnhbGl70IBqoUAJW+fWLQ+aG9tZTpzdGJ1
ZWhsZXIgT0JTIFByb2plY3QgPGhvbWU6c3RidWVobGVyQGJ1aWxkLm9wZW5zdXNl
Lm9yZz6IZgQTEQIAJgUCR9lvGAIbAwUJBB6wAAYLCQgHAwIEFQIIAwQWAgMBAh4B
AheAAAoJEONO1hiRD8FhRg0AniHkTI8/FbtPzQisHTZY2ZZI6KknAJ9g9rM+EiVZ
M5gRk/HAYAjntAUTOYhGBBMRAgAGBQJH2W8YAAoJEDswEbdrnWUjguUAnRNuVbq7
yKHN3pUsh6GYp3v/gUkYAKCJlcM73+khryODxrcGsXS+5+uBSw==
=PXsh
-----END PGP PUBLIC KEY BLOCK-----
</pre>
* https://launchpad.net/~stbuehler/+archive/web-stable (only released versions of lighttpd and spawn-fcgi), packages for ubuntu
* http://debian.stbuehler.de/ (for debian testing, may contain prereleases)
h2. openSUSE
Website:
* http://software.opensuse.org/search?baseproject=ALL&p=1&q=lighttpd
* http://download.opensuse.org/repositories/server:/http/
The buildservice from opensuse may contain packages for other systems too
<pre>
zypper install lighttpd
</pre>
Some modules are only available from extra packages (use @zypper search lighttpd@ to find them)
h2. YUM based systems
<pre>
yum install lighttpd
</pre>
h2. Gentoo
<pre>
emerge lighttpd
</pre>
* Please note:
Don't neglect to set the proper USE flags for your lighty installation and all its dependencies. Take a look at the flags Portage would use by running emerge with the --pretend --verbose --tree options. This will pretend to install lighttpd and display some informative output, such as all USE flags and dependencies:
<pre>
emerge -pvt lighttpd
</pre>
If necessary, add your desired flags to /etc/portage/package.use. For example, if you want to emerge lighttpd with support for MySQL and PHP but without SSL, set the according USE flags:
<pre>
echo "www-servers/lighttpd php mysql -ssl" >> /etc/portage/package.use
</pre>
h2. FreeBSD ports
FreeBSD has the ports and lighttpd is in this tree for a long time now.
<pre>
cd /usr/ports/www/lighttpd
make install clean
</pre>
If you don't get the configuration dialog, do @make config@ first. The additional CONFIG_ARGS for the PHP5 installation force cgi-fcgi support in /usr/local/bin/php. The option @--with-pcre-regex@ is needed to support several functions that use regular expressions like 'preg_match', and you really want that for things like conditionals, rewrite and redirect.
Now that everything is installed, enable lighttpd in rc.conf and edit it's configuration:
<pre>
echo lighttpd_enable=\"YES\" >> /etc/rc.conf
cd /usr/local/etc/
cp lighttpd.conf.sample lighttpd.conf
</pre>
You will probably need to create some directories and files, since the port neglects to do them for you (as of 2008 February 24), and make them accessible by the user and group "www" that lighttpd operates as:
<pre>
mkdir /var/log/lighttpd
touch /var/log/lighttpd/lighttpd.error.log
touch /var/log/lighttpd/lighttpd.access.log
chown www:www /var/log/lighttpd
chown www:www /var/log/lighttpd/lighttpd.error.log
chown www:www /var/log/lighttpd/lighttpd.access.log
</pre>
Edit lighttpd.conf to use the new directories and files as follows:
* @server.errorlog = "/var/log/lighttpd/lighttpd.error.log"@
* @accesslog.filename = "/var/log/lighttpd/lighttpd.access.log"@
Edit lighttpd.conf docroot:
* @server.document-root = "/usr/local/www/"@