代码改变世界

Gentoo 设置 emerge 代理

2012-03-23 18:10  夜幕降临  阅读(973)  评论(0编辑  收藏  举报

临时:

To emerge through a proxy you need to run this command

export http_proxy="http://username:password@proxy:8080"

This will set the variable until you restart your computer

If you also want to be able to use rsync you have to also run

export RSYNC_PROXY="http://username:password@proxy:8080"
永久方法:
或者

To have Portage automatically use this scheme, define it in /etc/make.conf:

Code Listing 3.4: /etc/make.conf

http_proxy="http://username:password@yourproxybox.org:portnumber"
ftp_proxy="ftp://username:password@yourproxybox.org:portnumber"
RSYNC_PROXY="rsync://username:password@yourproxybox.server:portnumber"