+ -
当前位置:首页 → 问答吧 → [FreeBSD]怎么让ports安装软件时快些?

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

时间:2008-06-13

来源:互联网

我输入:

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

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

/.cshrc 中已经设置了 setenv PACKAGEROOT ftp://ftp.cn.freebsd.org

作者: indian   发布时间: 2008-06-13

网络问题。反正ftp://ftp.cn.freebsd.org/有时很快有时很慢。它还限制接入的连接数。何必呢。

作者: masterdemon   发布时间: 2008-06-14

慢慢等待就是了

作者: fjuser   发布时间: 2008-08-02

PACKAGEROOT是pkg_add -r时候用的环境变量。
make MASTER_SITE_OVERRIDE=ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/ports/distfiles/

作者: logicBaby   发布时间: 2008-10-04

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}/

作者: fender010   发布时间: 2008-10-06

# 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才行。

作者: zyl19861126   发布时间: 2008-10-06

修改/etc/make.conf,在其中调用axel进行多线程下载,会大大加快下载的速度。具体的请Google

作者: dacheng   发布时间: 2008-10-13

wget -c 也不错。

作者: xiaorui   发布时间: 2008-10-27

hshh.org 的速度不错的说

作者: 有点白   发布时间: 2008-11-11

热门下载

更多