May 17, 2009

ubuntu lighttpd mysql fastcgi

打算用c写写cgi
不想用Apache2了,试试lighttpd

安装lighttpd
$ sudo apt-get install lighttpd

安装php5
$ sudo apt-get install php5 php5-cli php5-cgi php5-mysql

让Lighttpd支持CGI模式
$ sudo lighttpd-enable-mod cgi
$ sudo lighttpd-enable-mod fastcgi

注: 看下/etc/lighttpd/conf-enabled/10-cgi.conf中的cgi-bin目录是否正确

安装mysql
$ sudo apt-get install mysql-server

安装phpmyadmin
$ sudo apt-get install phpmyadmin

重起Lighttpd
$ sudo /etc/init.d/lighttpd restart

No comments:

Post a Comment

您的评论将使我blog更有动力~