Document directory
The Lighttpd documentation mentions that you can use
Yum install lighttd
To install, but I did not succeed in centos5.6, so I had to use the source code for installation.
Download
Download the Lighttpd source code package from the Lighttpd official website.
I downloaded version 1.4.29. If you use version 1.4.27 or earlier, the initialization code will be different. For more information, see the documentation.
Download the Lighttpd source package and unzip the tar zxvf lighttpd-1.4.29.tar.gzcd lighttpd-1.4.29
Install dependency
At the same time, you need to download two packages, which are the minimum package required by Lighttpd. You can also install other packages. For details, see the Lighttpd documentation.
Yum install PCRE-devel
Yum install zlib-devel
Bzip2-devel is optional, if you do not install this package, configure will prompt to add the suffix, simply also installed
Yum install bzip2-devel
Configure./configure
Buildmake
Install make install
Initialization code:
Sed-E's/Foo/Lighttpd/G' DOC/initscripts/rc. Lighttpd. RedHat>/etc/init. d/LighttpdChmod A + Rx/etc/init. d/lighttpdcp-p doc/initscripts/sysconfig. Lighttpd/etc/sysconfig/lighttpdmkdir-P/etc/Lighttpdcp -R doc/config/conf.d/ doc/config/*.conf doc/config/vhosts.d/ /etc/lighttpd/
chkconfig lighttpd on
If the version is 1.4.27 or earlier, initialize the code
sed -e 's/FOO/lighttpd/g' doc/initscripts/rc.lighttpd.redhat > /etc/init.d/lighttpdchmod a+rx /etc/init.d/lighttpdcp -p doc/initscripts/sysconfig.lighttpd /etc/sysconfig/lighttpdmkdir -p /etc/lighttpdinstall -Dp ./doc/lighttpd.conf /etc/lighttpd/lighttpd.conf
chkconfig lighttpd on