系统安装、升级、内核定制
FreeBSD 5.2.1 RELEASE
Mysql 4.0
Apache 2.0.50
PHP 4.3.8
Pure Ftpd 1.0.20
一、系统安装
系统安装选择standard方式
Minimal 安装,安装完后启动系统
configure->distributions
选择:src->sys 和 ports 两个,安装系统内核源码和ports tree
这一段对服务器没用,只是为了方便在家里用ADSL接入互联网,以便调试服务器
================================================
启用adsl:
编辑 ppp.conf 配置文件
加入以下代码:
| Code: | [Copy to clipboard] |
adsl : #配置代号
set device PPPoE: em0 # 用你的网卡设备名称替代xl1 set authname *** #你的ADSL登陆名称 set authkey *** #你的账号密码 set dial set login set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR# Add a (sticky) default route enable dns #从拨号服务器中获得正确的DNS服务器地址 |
|
注意:每一个设定行前要有一个空格,adsl: 这一个配置代号行前面不能有空格
手动启用ADSL:
如果想在系统启动时自动启用adsl:ee /etc/rc.conf
加入以下代码:
| Code: | [Copy to clipboard] |
ppp_enable="YES" ppp_mode="ddial" ppp_profile="adsl" |
|
===================================
二、cvsup 升级源码
确定机器已经联上网了
| Code: | [Copy to clipboard] |
cd /usr/ports/net/cvsup-without-gui make install clean |
|
这个过程会很漫长,去看会儿 China Open 吧,吼吼 ........
好了,cvsup 装好了,现在来升级源码
supfile懒得自己写,可以拷sample过来用:
为了以后升级时不用再写supfile,建个目录放supfile吧
| Code: | [Copy to clipboard] |
mkdir /usr/cvusp cp /usr/share/examples/cvsup/stable-fupfile /usr/cvsup cp /usr/share/examples/cvsup/standard-fupfile /usr/cvsup cp /usr/share/examples/cvsup/ports-fupfile /usr/cvsup |
|
一般就用这三个,如果你觉得不够,可以将 /usr/share/examples/cvsup 下面的supfile 全拷过去
更新 ports tree
编辑 supfile
| Code: | [Copy to clipboard] |
| ee /usr/cvsup/ports-supfile |
|
为了加快 cvsup 的速度,用国内的cvsup服务器
| Code: | [Copy to clipboard] |
| *default host=cvsup3.cn.freebsd.org #把这行改了 |
|