1.安装Mysql
#cd /usr/ports/database/mysql40-server
#make install
SKIP_DNS_CHECK=yes 表示在加入本机名字时﹐不用做反向解析
BUILD_OPTIMIZED=yes 表示在编译时优化处理
BUILD_STATIC=yes 把mysqld编译成静态执行版本
with-charset=gb2312
在/etc/rc.conf中添加mysql_enable="YES"
重启后就启动了mysqld守护进程
#mysql 看到mysql>就说明正常了
2.安装Apache
#cd /usr/ports/www/apache2
#make install clean
3.安装PHP4
#cd /usr/ports/www/mod_php4
#cd /usr/ports/lang/php4-exstentions
4.配置apache
#ee /usr/local/etc/apache2/http.conf
DirectoryIndex index.php index.html index.html.var
AddDefaultCharset GB2312
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
5.测试php
<?
phpinfo();
?>