FreeBSD 9.0常用配置

1804阅读 0评论2012-11-30 dearyzy
分类:系统运维

一、Ports Tree更新

1、配置更新服务器地址

shell>vi /etc/portsnap.conf

SERVERNAME=portsnap.cn.FreeBSD.org

2、首次获取Ports

shell>portsnap fetch extract

3、更新Ports

shell>portsnap fetch update

 

二、以root用户SSH(不建议)

1、修改配置文件

shell>vi /etc/ssh/sshd_config

#PermitRootLogin no修改为PermitRootLogin yes

#PasswordAuthentication no修改为PasswordAuthentication yes

#PermitEmptyPasswords no修改为PermitEmptyPasswords no

2、配置生效

shell>/etc/rc.d/sshd reload

三、加速make下载

1、增加配置文件

shell>vi /etc/make.conf

MASTER_SITE_BACKUP?=\
    {DIST_SUBDIR}/\
    ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}/\
    ftp://freebsd.csie.nctu.edu.tw/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}/\
    ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}

MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}

2、安装wget

shell>cd /usr/ports/ftp/wget/

shell>make install clean

3、修改配置文件

shell>vi /etc/make.conf

FETCH_CMD=wget
FETCH_BEFORE_ARGS=-c -t 1
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes

MASTER_SITE_BACKUP?=\
    {DIST_SUBDIR}/\
    ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}/\
    ftp://freebsd.csie.nctu.edu.tw/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}/\
    ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DICT_SUBDIR}

MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}

上一篇:Linux系统下常见的压缩文件及解压方法
下一篇:Dreamweaver重新设置文件关联