In reference Robbin "in the Linux platform to install and configure Ruby on Rails explain" after the RHEL environment a try, and configure successfully.

step 1: check whether the system is installed to support the library pcre
# Rpm-qa | grep pcre
pcre-4.5-4.el4_5.1

Problem: I have been prompted to install the system, but because the version problem, can not be installed LIGHTTPD, therefore re-download and install PCRE

In / usr / local / src / under
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.6.tar.gz

Extract
tar xzvf pcre-7.6.tar.gz
Pcre-7.6 directory to generate and access to the directory
Configure & compile pcre
. / configure
make
make clean
make install

Supported database installation is complete

step 2: install lighttpd
First of all in / usr / local / src / under lighttpd download the original file
wget http://www.lighttpd.net/download/lighttpd-1.4.20.tar.gz
Extract

tar xzvf lighttpd-1.4.20.tar.gz generated lighttpd-1.4.20 directory, enter the directory
Compile:. / Configure - prefix = / usr / local / lighttpd
configure is finished, will give an activation module and did not activate the list of modules, you can check whether their required modules have been activated enable the module in the must have "mod_rewrite" This one, otherwise a re-examination of pcre installed. Then compile and install:
make & & make clean & & make install

step 3 to configure the environment
Compiled configuration: The reason to do so, please see doc / rc.lighttpd.redhat will understand
cp doc / sysconfig.lighttpd / etc / sysconfig / lighttpd
mkdir / etc / lighttpd
cp doc / lighttpd.conf / etc / lighttpd / lighttpd.conf
cp doc / rc.lighttpd.redhat / etc / init.d / lighttpd

Modify the contents of the following documents of the following
/ etc / init.d / lighttpd, put
lighttpd = / usr / sbin / lighttpd
Changed
lighttpd = / usr / local / lighttpd / sbin / lighttpd

The document used to start and stop LIGHTTD Service
This script is used to control the startup lighttpd turn off and re-starting:
/ etc / init.d / lighttpd start
/ etc / init.d / lighttpd stop
/ etc / init.d / lighttpd restart

If you wish to start when the server restart lighttpd, then:
chkconfig lighttpd on

step 4: Configure / usr / local / lighttpd.conf
The main attention should be paid to you, server.document-root, server.error-log, accesslog.filename need to specify the appropriate directory, by default, some directory or file does not exist, it is necessary to set up.

Finished! !