第一步
#apt-get install lighttpd php5-cgi php5-mysql mysql-server php5-gd
第二步
#vi /etc/lighttpd/lighttpd.conf
server.modules项增加一行,内容为:

“mod_fastcgi”

还需要在文件末尾加下面的内容:

fastcgi.server = ( “.php” =>
( “localhost” =>
(
“socket” => “/tmp/php.socket”,
“bin-path” => “/usr/bin/php5-cgi”
)
)
)

第三步
#service lighttpd restart