系统设置代理
export http_proxy=http://127.0.0.1:8080
export https_proxy=http://127.0.0.1:8080
#无需代理的IP
export no_proxy="localhost, 127.0.0.1, ::1"
#更新一下环境文件:
source /etc/profile
#取消设置
unset http_proxy
unset https_proxy
unset ftp_proxy
unset no_proxy
yum配置代理
在/etc/yum.conf
后面添加以下内容:
proxy=http://127.0.0.1:8080
#更新一下环境文件:
source /etc/yum.conf
wget代理设置:
编辑文件为:/etc/wgetrc
添加下面两行:
http_proxy=http://127.0.0.1:8080
https_proxy=http://127.0.0.1:8080
#然后更新一下环境文件:
source /etc/wgetrc