|
|
发表于 2007-6-5 17:20:07
|
显示全部楼层
看起来像网络问题,估计要设代理
请看这个
通过代理服务器使用yum
你可以通过标准的web代理服务器来访问软件仓库。如果你的系统通过一个web代理服务器访问 Internet,在/etc/yum.conf里要指定代理服务器详细资料。代理服务器设置项必须指定该代理服务器的完整URL,包括TCP端口号。如果你的代理服务器需要用户名或密码,通过添加代理服务器用户名(username)和代理服务器密码(password)设置项来指定。
下面设置yum使用代理服务器mycache.mydomain.com,连接到端口3128,使用用户名yum-user和密码qwerty。
QUOTE:
# The proxy server - proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty
例3.使用代理服务器配置文件设置
全局设置
如果你在/etc/yum.conf中定义代理服务器,则当使用yum时所有用户都以这些定义连接这个代理服务器。
要允许特定用户访问代理服务器,则添加下列一些行到用户的shell profile文件中。缺省是bash shell,profile文件是~/.bash_profile。下面的设置允许shell所在用户的yum使用代理服务器 mycache.mydomain.com,连接到端口3128。
QUOTE:
# The Web proxy server used by this account
http_proxy="http://mycache.mydomain.com:3128"
export http_proxy
例4. 为使用代理服务器的Profile文件设置
如果代理服务器需要用户名或密码,添加这些到URL。要包含用户名yum-user和密码qwerty,设置如下:
QUOTE:
# The Web proxy server, with the username and password for this account
http_proxy="http://yum-user:qwerty@mycache.mydomain.com:3128"
export http_proxy
例5. 为代理服务器安全的Profile文件设置
http_proxy环境变量
The http_proxy environment variable is also used by curl and other utilities. Although yum itself may use http_proxy in either upper-case or lower-case, curl requires the name of the variable to be in lower-case.
原文
http://liqiankun80.blog.163.com/ ... 660920074695637767/ |
|