如何配置gentoo的源

如何配置gentoo的源
2011-05-24 01:07

====================================================================
问:我如何修改源?

答:Gentoo中没有源的概念。portage 与 distfiles 合起来可以跟源的概念等问。
portage里装的是ebuild, 可以说是软件包的数据库,指导portage从哪里下载源码包以及从何外下载。

distfile里就是源码包了。一般的源码包会被放在gentoo服务器中的distfiles文件夹中。
其他有些特殊的源码包(协议或体积大小等关系),要从软件的官方网站下载,
这可以由ebuild指定。再有些,必须签定用户协议的,portage会提示用户手动到官网下载,
并放置于 /usr/portage/distfiles 中。

portage对应的就是SYNC镜像,distfiles对应的就是GENTOO_MIRRORS。
可以通过修改 /etc/make.conf 中的 SYNC 和 GENTOO_MIRRORS 变量进行指定。我现在的配置文件:

代码:
  
  
SYNC="rsync://64.127.121.98/gentoo-portage" GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo/ ftp://ftp.linuxforum.net/gentoo http://mirror.uni-c.dk/pub/gentoo/ http://mirror.gentoo.gr.jp/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO ftp://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO"

======================================================================

实际上只要把/etc/make.conf文件写成如下形式即可(兰大gentoo源):
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-O2 -march=i686 -pipe"
#CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="i686-pc-linux-gnu"

GENTOO_MIRRORS="ftp://mirror.lzu.edu.cn/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"



GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://mirrors.sohu.com/gentoo/"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值