Linux终端使用代理服务器
1、YUM添加代理服务器:
1 | [root@localhost /] # vim /etc/yum.conf |
添加如下项目:
proxy=http://172.16.1.188:8888/
2、WGET添加代理服务器:
1 | [root@localhost /] # vim /etc/wgetrc |
添加如下项目:
https_proxy = http://172.16.1.188:8888/
http_proxy = http://172.16.1.188:8888/
ftp_proxy = http://172.16.1.188:8888/
3、添加全局代理:
1 2 | [root@localhost /] # export http_proxy=http://172.16.1.188:8888 [root@localhost /] # export https_proxy=http://172.16.1.188:8888 |
4、取消全局代理:
1 2 | [root@localhost /] # unset http_proxy [root@localhost /] # unset https_proxy |
[THE END]
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步