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

前端之家收集整理的这篇文章主要介绍了centos6.9终端设置代理访问外网络前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

本文永久地址: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/

参考:http://www.cnblogs.com/zjoch/p/6509925.html

本文永久地址:https://my.oschina.net/bysu/blog/1359109

猜你在找的CentOS相关文章