Linux服务器使用代理服务

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

 

posted @ 2019-07-23 14:50  你压我头发了~  阅读(8410)  评论(0编辑  收藏  举报