|
网上写freebsd服务器安装的程序太多了,5.4的太少了,我边装边写,与大家共同研究。
一、安装系统
最小安装
二、安装cvsup,更新ports树
#setenv PACKAGEROOT "ftp://ftp.cn.freebsd.org"
#pkg_add -rv cvsup-without-gui
安装完成执行
#/usr/local/bin/cvsup -g -L 2 -h cvsup.freebsdchina.org /usr/share/examples/cvsup/ports-supfile
三、ports安装mysql
#cd /usr/ports/databases/mysql41-server/
#make install clean
四、ports安装apache2
# cd /usr/ports/www/apache2
# make install clean
五、安装php
# cd /usr/ports/www/mod_php4
# make install clean
选择
[X] APACHE2
安装需要的PHP扩展模块
# cd /usr/ports/lang/php4-extensions
# make install clean (gettext需选中)
# cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
# vi /usr/local/etc/php.ini
default_charset = "gbk"
register_globals = ON
session.save_path = /tmp
编辑/usr/local/etc/apache2/httpd.conf
加两行。
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php
DirectoryIndex index.html index.html.var index.php
六、安装cyrus-sasl
# cd /usr/ports/security/cyrus-sasl2
# make install WITH_AUTHDAEMON=yes |
|