Garey's Blog–FreeBSD/PHP/GoLang

十二月 15th, 2009

FreeBSD7.2下Lighttpd+PHP+Mysql安装配置笔记

7,026 views, FreeBSD, MySQL, PHP, by garey.

1,安装mysql
cd /usr/ports/database/mysql51-server
make install clean
2,安装lighttpd
cd /usr/ports/www/lighttpd
make install clean
(默认选项)
3,安装php5
cd /usr/ports/lang/php5
make install clean
(默认选项)
4,安装php5-extensions
cd /usr/ports/lang/php5-extensions
make install clean
增加GD,MBSTRING,MCRYPT,MYSQL,MYSQLI
5,配置lighttpd
vi /usr/local/etc/lighttpd.conf
取消需要用到模块的注释,mod_rewrite,mod_access,mod_fastcgi,
mod_simple_vhost,mod_cgi,mod_compress,mod_accesslog
取消fastcgi.server的注释
fastcgi.server = ( “.php” =>
( “localhost” =>
(
“socket” => “/var/run/lighttpd/php-fastcgi.socket”,
“bin-path” => “/usr/local/bin/php-cgi”
)
)
)
另:
touch /var/log/lighttpd.access.log
touch /var/log/lighttpd.error.log
mkdir /var/run/lighttpd
chown -R www:www /var/run/lighttpd
chown www:www /var/log/lighttpd.access.log
chown www:www /var/log/lighttpd.error.log
6,启动lighttpd和mysql
vi /etc/rc.conf
增加
mysql_enable=”YES”
lighttpd_enable=”YES”
执行
/usr/local/etc/rc.d/lighttpd start
/usr/local/etc/rc.d/mysql start

Back Top

回复自“FreeBSD7.2下Lighttpd+PHP+Mysql安装配置笔记”

  1. 引用:FreeBSD下Lighttpd+PHP+Mysql安装配置笔记 – 【FreeBSD技术文摘】

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*