Lighttpd + PHP + XCache

| | Comments (0)

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

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on April 13, 2008 2:19 AM.

Microsoft Extends Windows XP Support To 2014-04-18 was the previous entry in this blog.

PHP short_open_tag is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.