Centos系统使用代理上网 yum的代理设置

Centos系统使用代理上网 yum的代理设置 

1.打开/etc/yum.conf 配置文件进行编辑
在后面添加以下内容(ip号+端口后无认证连接)
proxy=http://192.168.5.100:8086
 
如果需要认证连接则输入以下内容

proxy=http://192.168.5.100:8086

proxy_username=代理服务器用户名

proxy_password=代理服务器密码

那怎么设置全局代理上网呢?
以上只是针对某些软件代理而已。

打开etc/skel/.bash_profile进行编辑
http_proxy=http://192.168.5.100:8080
https_proxy=http://192.168.5.100:8080
export http_proxy https_proxy
 
执行source etc/skel/.bash_profile马上更新
 
执行wget http://www.baidu.com执行测试
 
 
原创文章 54 获赞 168 访问量 63万+

猜你喜欢

转载自blog.csdn.net/bojie5744/article/details/42148719
今日推荐