在profile文件中设置相关环境变量:

vi /etc/profile

添加以下内容:

http\_proxy=192.168.137.1:1080
https\_proxy=192.168.137.1:1080
ftp\_proxy=192.168.137.1:1080
no\_proxy=192.168.137.0.
export http\_proxy https\_proxy ftp\_proxy no\_proxy

说明:指定http代理、https代理、ftp代理;局域网不使用代理。 保存退出,注销重新登录系统或重启系统生效。