Lighttpd
wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.bz2
tar jxvf lighttpd-1.4.19.tar.bz2
cd lighttpd-1.4.19
./configure --prefix=/usr/local/lighttpd
make && make install
cd doc
mkdir /etc/lighttpd
cp lighttpd.conf /etc/lighttpd
cp sysconfig.lighttpd /etc/sysconfig/lighttpd
cp rc.lighttpd.redhat /etc/init.d/lighttpd
sed -i "s/sbin/local\/lighttpd\/sbin/" /etc/init.d/lighttpd
mkdir /var/run/lighttpd /var/log/lighttpd
chown apache.apache /var/run/lighttpd /var/log/lighttpd
server.modules = (
"mod_rewrite",
"mod_redirect",
"mod_alias",
"mod_access",
"mod_fastcgi",
"mod_cgi"
"mod_accesslog" )
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )
server.document-root = "/var/www/html/"
server.username = "apache"
server.groupname = "apache"
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
)
)
PHP
wget http://tw.php.net/distributions/php-5.2.5.tar.bz2
tar jxvf php-5.2.5.tar.bz2
cd php-5.2.5
./configure --prefix=/usr/local/php-fcgi --with-mysql=/usr --with-mssql \
--with-config-file-path=/usr/local/php-fcgi/etc \
--enable-sockets --enable-pcntl --enable-mbstring --with-iconv \
--with-gd --with-curl --with-zlib --with-jpeg-dir --with-ttf \
--with-ldap --with-gettext --enable-soap --with-xmlrpc --with-openssl \
--enable-fastcgi --enable-discard-path --enable-force-cgi-redirect
make && make install
cp php.ini-recommended /usr/local/php-fcgi/etc/php.ini
echo cgi.fix_pathinfo=1 >> /usr/local/php-fcgi/etc/php.ini
ref. Setting up PHP with Lighttpd
XCache
wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.bz2
tar jxvf xcache-1.2.2.tar.bz2
cd xcache-1.2.2
/usr/local/php-fcgi/bin/phpize --clean
/usr/local/php-fcgi/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/php-fcgi/bin/php-config
make && make install
cat xcache.ini >> /usr/local/php-fcgi/lib/php.ini
edit /usr/local/php-fcgi/lib/php.ini
zend_extension = /usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
xcache.size = 4M
Leave a comment