您的位置:首页 > 理论基础 > 计算机网络

centos6.9终端设置代理访问外网络

2017-07-13 00:00 369 查看
本文永久地址:https://my.oschina.net/bysu/blog/1359109

由于公司网络需要用到代理,才能对外网进行访问。不设置外网进行yum访问,会报如下错误:

[subaoya@localhost ]$ sudo yum groupinstall "Development tools"
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

yum proxy

文件目录

vim /etc/yum.conf


添加如下

proxy = http://[username:password@]yourproxy:8080/[/code] 
参考:http://www.cnblogs.com/zjoch/p/6509925.html

本文永久地址:https://my.oschina.net/bysu/blog/1359109
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: