1.1 设置 http 代理
1.1.1 只在当前 shell 生效
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://<proxy_server>:”
有些软件识别不了小写版本,可以在再设置一份大写版本 HTTP_PROXY HTTPS_PROXY FTP_PROXY ALL_PROXY
1.1.2 全局生效
vim /etc/profile #编辑全局配置文件
#TODO -> 在文件末尾添加 1.1.1 中的代理代码,保存后关闭文件
source /etc/profile #试配置文件生效