系统设置代理

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
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐