一直看重FreeBSD的高性能
但是安装又比较繁琐
今日折腾一下-,-

首先升级Ports树
# portsnap fetch
# portsnap update

安装Lighttpd
# cd /usr/ports/www/lighttpd
# make
# make install
# make clean

安装MySQL服务
# cd /usr/ports/databases/mysql50-server/
# make
# make install
# make clean

安装MySQL Client
# /usr/ports/databases/mysql50-client
# make
# make install
# make clean

安装MySQL Scripts
# cd /usr/ports/databases/mysql50-scripts
# make
# make install
# make clean

安装PHP
# cd /usr/ports/lang/php5
# make
# make install
# make clean

安装PHP扩展
# cd /usr/ports/lang/php5-extensions
/code># make
# make install
# make clean

设置开机自启动服务
# vi /etc/rc.conf
在末尾加入
mysql_enable="YES"
lighttpd_enable="YES"

启动MySQL和Lighttpd
# /usr/local/etc/rc.d/mysql-server start
# /usr/local/etc/rc.d/lighttpd start

配置文件路径: /usr/local/etc/lighttpd.conf
网页文件路径 : /usr/local/www/data/
默认用户组 : www