一、最小化安装freebsd6.1
二、设置网络
vi /etc/rc.conf
添加:
hostname="server.test.com"
ifconfig_lnc0="inet 192.168.10.121 netmask 255.255.255.0"
defaultrouter="192.168.10.1"
保存退出
vi /etc/resolv.conf
添加
nameserver 202.96.209.133
保存退出
运行:
/etc/netstart
三、安装ports
运行sysinstall->Configure->Distributions->ports
四、安装perl
cd /usr/ports/lang/perl5.8 && make install clean
五、安装mysql5.0
用adduser添加用户mysql到mysql组中
下载mysql5.0然后运行
tar zxvf mysql.tar.tar
mv mysql-standard-5.0.22-freebsd6.0-i386 /usr/local/mysql
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql
第一次启动mysql服务
bin/mysqld_safe --user=mysql &
修改数据库管理员密码为123456
bin/mysqladmini -uroot password 123456
cp support-files/mysql.server /usr/local/etc/rc.d/mysql.sh
六、安装apache2.0
下载apache2.0然后运行
tar zxvf httpd.tar.gz
cd httpd-2.0.59
./configure --prefix=/usr/local/http --enable-so --enable-rewrite
make
make install
make clean
修改httpd.conf
vi /usr/local/httpd/conf/http.conf
添加
ServerName localhost
运行
/usr/local/http/bin/apachectl start
自动运行服务
cp /usr/local/http/bin/apachectl /usr/local/etc/rc.d/http.sh
七、安装gd
cd /usr/ports/graphics/gd && make install clean
八、安装libxml2
cd /usr/ports/textproc/libxml2 && make install clean
九、安装t1lib
cd /usr/ports/devel/t1lib/ && make install clean
十、安装PHP5.1
下载php5.1然后运行
tar zxvf php.tar.gz
cd php-5.1.4
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-mysql=/usr/local/mysql --with-gd --with-jpeg-dir=/usr/local/bin --with-zlib-dir=/usr/local/bin --with-freetype-dir --with-xpm-dir=/usr/loacl/bin --with-t1lib
make
make install
make clean
cp php.ini-dist /usr/local/php/php.ini
修改apache配置文件
vi /usr/local/http/conf/httpd.conf
添加
AddType application/x-httpd-php .php
修改DirectoryIndex为
DirectoryIndex index.html index.php
保存退出
重启apache服务
安装全部完成
阅读(586) | 评论(0) | 转发(0) |