一、安装apache2.2.4
#cd /usr/ports/www/apache22/
#make install clean

安装过程中,apache2.2.4依赖的包都将被一起安装好,等待安装完成....
pkg_info查看 多出一行 apache-2.2.4_2 说明安装成功
二、安装Mysql-5.1.17
#cd /usr/ports/databases/mysql51-server
#make install clean

安装过程也将会安装依赖包..等待安装完成....

pkg_info查看 多出一行mysql-server-5.1.20说明安装成功.....
四、安装php和php-extensions
1.安装php5.2.1
#cd /usr/ports/lang/php5
#make install clean

钩选CLI CGI APACHE SUHOSG FASTCGI FATHINFO
OK..等待安装完成....

pkg_info查看 多出一行 php5-5.2.3_1说明安装成功....
2.安装php5-extensions
#cd/usr/ports/lang/php5-extensions
#make install claen

_________________________________________________________
弹出安装选项菜单

这个是安装一些php的常用模块,必须再选择下列几个常用的项目:CTYPE、EXIF、GD、ICONV、IMAP、PCRE、SESSION、ZLIB。 SESSION 尤其重要
如果不熟悉可全选 OK...
安装过程也将会安装依赖包..等待安装完成....
什么???安装出错???不好意思那不是我的错.那是你平时烧香烧得少.
呵呵..重新安装pnp5-extensions
#cd /usr/ports/lang/php5-extensions
#make config
#make WITHOUT_X11=yes install claen
如还有错误请
#/usr/ports/databases/firebird-server
#make install claen
/usr/ports/databases/firebird2-server/
make install
cd /usr/ports/databases/php5-pdo_mysql
make install
cd /usr/ports/databases/php5-pdo_odbc
make install
mkdir /tmp/eaccelerator
make install
make WITHOUT_X11=yes install claen
等待安装完成....

pkg_info查看是否安装成功.......
__________________________________________________这是老爱出问题我也不知道怎么回事。。
接下来我们来配置启动 #ee /etc/rc.conf
加上2行
mysql_enable="YES"
apache_enable="YES"
存盘退出..
执行
#/usr/local/etc/rc.d/apache22 start #启动apache2.2

安装成功后 netstat -a 查看端口 多出一行.http说明启动成功
用IE打开你FreeBSD的IP
3.配置mysql
以my.cnf作为以后mysql设定档
/usr/local/bin/mysql_install_db
#whereis mysql_install_db #查看命令档的执行路径
修改用户组权限
#chown -R mysql:mysql /var/db/mysql
#chown -R mysql:mysql /usr/local/share/mysql
#chmod 744 /usr/local/share/mysql/mysql.server
#/usr/local/bin/mysql_install_db #初始化数据库
cp /usr/local/share/mysql/mysql.server /usr/local/etc/rc.d/mysql-server.sh #创建启动脚本
/usr/local/etc/rc.d/mysql-server.sh start #启动mysql

