LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4221|回复: 8

[FreeBSD]怎么让ports安装软件时快些?

[复制链接]
发表于 2008-6-13 15:42:50 | 显示全部楼层 |阅读模式
我输入:

# cd /usr/ports/www/apache22
# make config ; make install clean

然后就有下载过程,下载速度 6522 Bps,整个速度很慢啊。有什么办法让这个速度快些吗?

/.cshrc  中已经设置了 setenv PACKAGEROOT ftp://ftp.cn.freebsd.org
发表于 2008-6-14 01:54:07 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2008-8-2 12:17:37 | 显示全部楼层
慢慢等待就是了
回复 支持 反对

使用道具 举报

发表于 2008-10-4 13:21:45 | 显示全部楼层
PACKAGEROOT是pkg_add -r时候用的环境变量。
make MASTER_SITE_OVERRIDE=ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/ports/distfiles/
回复 支持 反对

使用道具 举报

发表于 2008-10-5 23:48:25 | 显示全部楼层
add this content to your make.conf:
# set server for dietfiles
MASTER_SITE_OVERRIDE?=http://ports.hshh.org/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=http://ports.cn.freebsd.org/${DIST_SUBDIR}/
回复 支持 反对

使用道具 举报

发表于 2008-10-6 12:56:32 | 显示全部楼层
# for the gcc and compile the kernel.
# ===========================================================================
# for the gcc's parameter.
# ===========================================================================
# CFLAGS= -march=K8 -O2 -pipe -fomit-frame-pointer                               # this is can good work for usually.
# CFLAGS= -O2 -fno-strict-aliasing -pine # compile the kernel, default is this.
# CFLAGS= -O3 -march=athlon64 -pipe         # gcc
# CXXFLAGS+= -O3 -march=athlon64 -pipe         # c++
NO_CPU_CFLAGS= true        # Don't add -march=<cpu> to CFLAGS automatically
NO_CPU_COPTFLAGS= true        # Don't add -march=<cpu> to COPTFLAGS automatically
CPUTYPE?= athlon64      #  cpu's type , mine athlon64, amd3600+.
CFLAGS= -O2 -march=athlon64 -fomit-frame-pointer -pipe       #  gcc's cc.
CXXFLAGS+= -O2 -march=athlon64 -fomit-frame-pointer -pipe    #  C++

KERNCONF=MYKERNEL        # controls which kernel be use by: make buildkernel.

# tell the gcc, I want build the modules, and what I don't build. and make buildworld, then what I dont want to rebuild.
# ==============================================================================
MODULES_OVERRIDE= linux acpi reiserfs ext2fs cd9660_iconv msdosfs_iconv \
libiconv syscons/logo syscons/fire syscons/star mac_* sound sound/driver/hda \
ichwd nfe nvram ipfw

# for the ports.
# ==========================================
MASTER_SITE_BACKUP= \
http://ports.cn.freebsd.org/${DIST_SUBDIR}/ \
http://ports.hshh.org/${DIST_SUBDIR}/ \
ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://freebsd.csie.nctu.edu.tw/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp.hk.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp5.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/

MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}
MASTER_SITE_GNOME=ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles/gnome2/

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

# for the cvsup upgrade by : cd /usr/ports; make update. Then what will do.
# ==============================================================================
# BATCH=yes # when compile for: portupgrade -a , then not ask you some question.
PORTSSUPFILE=/usr/share/examples/cvsup/ports-supfile
DOCSUPFILE=/usr/share/examples/cvsup/doc-supfile
SUPFILE=/usr/share/examples/cvsup/standard-supfile
NO_DOCUPDATE= true # set this to not update the doc three during 'make update'.
SUP_UPDATE=yes
SUP=/usr/local/bin/cvsup
SUPFLAGS=-g -L 2
SUPHOST=cvsup.cn.FreeBSD.org


以上是我的/etc/make.conf, 你把他直接拷贝到你的/etc/make.conf就可以了, 包括了 编译内核 cvsup ports等选项, 至于如何让ports安装快点, 以上我用 wget 代替了 ports 默认的下载器 fetch, 所以你必须要先安装wget才行。
回复 支持 反对

使用道具 举报

发表于 2008-10-13 11:30:01 | 显示全部楼层
修改/etc/make.conf,在其中调用axel进行多线程下载,会大大加快下载的速度。具体的请Google
回复 支持 反对

使用道具 举报

发表于 2008-10-27 15:15:10 | 显示全部楼层
wget -c 也不错。
回复 支持 反对

使用道具 举报

发表于 2008-11-10 22:44:11 | 显示全部楼层
hshh.org 的速度不错的说
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表