Freebsd Jail安装Howto

2009-05-13 01:53:25来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

呵呵,安装系统总是很烦的,为了实现“五分钟安装一台Server”,我告诉大家使用jail来驱动freebsd的决胜大法。
1.1. make jail world
需要先为vhost准备一个目录:
mkdir –p /home/jail/hdtest
1.1.1. 没有make world过
如果你从没有做过make world,哪么你只能这样:
cd /usr/src
make world DESTDIR=/home/jail/hdtest
你会发现需要一个很久的时间的。 当然,如果你需要定制你的world你可以学习一下我的/etc/make.conf文件:
CPUTYPE=i686
NO_FORTRAN=    true    # do not build g77 and related libraries
NO_I4B=        true    # do not build isdn4bsd package
NO_LPR=        true    # do not build lpr and related programs
NO_SENDMAIL=   true    # do not build sendmail and related programs
NO_SHAREDOCS=  true    # do not build the 4.4BSD legacy docs
NO_X=          true    # do not compile in XWindows support (e.g. doscmd)
NOGAMES=       true    # do not build games (games/ subdir)
NOINFO=        true    # do not make or install info files
NOPERL=        true    # do not build perl. Disables OpenSSL optimizations
NOPROFILE=     true    # Avoid compiling profiled libraries
NOUUCP=        true    # do not build uucp related programs
对于FreeBSD 5.x和更新的版本,建议的/etc/make.conf如下:
NO_ACPI=        true
NO_BOOT=        true
NO_BIND=        true
NO_BLUETOOTH=   true
NO_FORTRAN=     true
NO_I4B=         true
NO_IPFILTER=    true
NO_PF=          true
NO_AUTHPF=      true
NO_KERBEROS=    true
NO_LPR=         true
NO_MODULES=     true
NO_SHAREDOCS=   true
NO_USB=         true
NOATM=          true
NOGAMES=        true
NOINET6=        true
NOLIBC_R=       true
NOPROFILE=      true
1.1.2. 听说并且make world过
呵呵,如果你听说并且make world过,哪么你是幸福的人,而且真的就可以五分钟就安装完这个系统了:
cd /usr/src
make installworld DESTDIR=/home/jail/hdtest
cd /usr/src/etc
make distribution DESTDIR=/home/jail/hdtest
1.2. 准备vhost使用的地址
你可以手工临时的启动一个alias的ip地址:
ifconfig fxp0 inet 192.168.10.60 netmask 255.255.255.255 alias
这里fxp0换成你的网卡,ip换成你的ip。但是临时的方法并不好,将这行加入到/etc/rc.conf中去罢:

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD 5 Jail Install Howto

下一篇:jail十全大补丸