CentOS5.6环境下设置yum代理

CentOS5.6环境下设置yum代理


学校环境下上网需要设置代理服务器。所以新安装的CentOS无法使用yum和wget等进行操作。现把自己的配置设置显示如下:

网络上面的英文的配置资料如下:

Using yum with a proxy server
---------------------------------------
To enable yum operations to use a proxy server you should first add the following parameter to /etc/yum.conf         
这个是配置代理网络之后的yum的设定

proxy=http://yourproxy:8080/  

编辑/etc/yum.conf文件

这个是我们我的具体的代理的设定:在yum.conf文件的最后一行添加如下所示:

有#的是注释行 起说明作用 方便我们自己了解这行的作用



where yourproxy is the name of the proxy server you want to access and 8080 is the proxy port. If the server requires authentication you can specify the login credentials like:

proxy=http://username:password@yourproxy:8080/

---------------------------------------

The rpm package manager makes use of the proxy environment variable. This can be set system wide in /etc/profile or user specific in ~/.bash_profile::

export http_proxy=http://yourproxy:8080/
export ftp_proxy=http://yourproxy:8080/

---------------------------------------

To use wget throug a proxy server add the following lines to /etc/wgetrc     
这个是配置代理网络之后的wget的设定

http_proxy = http://yourproxy:8080/  
ftp_proxy = http://yourproxy:8080/  





In both cases, login information can be set like in the example above.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值