CentOS8设置系统级别代理


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

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即可。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM