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