1、YUM添加代理服务器:

[root@dev src]#vim /etc/yum.conf  --添加如下一行

proxy=http://代理服务器ip:port/

 

2、WGET添加代理服务器:

[root@dev src]#vim /etc/wgetrc

添加如下项目:

  https_proxy = http://代理服务器ip:port/
  http_proxy = http://代理服务器ip:port/
  ftp_proxy = http://代理服务器ip:port/

 


3、添加全局代理:

[root@dev src]# export http_proxy=http://代理服务器ip:port
[root@dev src]# export https_proxy=http://代理服务器ip:port/

 

4、取消全局代理:

[root@dev src]#unset http_proxy
[root@dev src]#unset https_proxy

 

相关文章: