说明:一般公司需要通过代理才能联网的情况下才需要设置系统级别代理。

1、编辑全局配置文件:vim /etc/profile

2、添加如下内容:

export http_proxy=”http://<user>:<password>@<proxy_server>:<port>”

export https_proxy=”http://<user>:<password>@<proxy_server>:<port>”

export ftp_proxy=http://<user>:<password>@<proxy_server>:<port>

export all_proxy=http://<user>:<password>@<proxy_server>:<port>

export HTTP_PROXY=”http://<user>:<password>@<proxy_server>:<port>”

export HTTPS_PROXY=”http://<user>:<password>@<proxy_server>:<port>”

export FTP_PROXY=http://<user>:<password>@<proxy_server>:<port>

export ALL_PROXY=http://<user>:<password>@<proxy_server>:<port>

这里一口气全部设置,经试验这样设置后可以自动通过代理联网的应用有(目前只测试了这么多,后续测试到了继续往这里追加):yumcurlwget

3、之后source /etc/profile或者重启CentOS8即可。

版权声明:本文为sinicheveen原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/sinicheveen/p/13866937.html