前面讲了yum 代理设置上网的方法,现在设置一下系统代理上网,
网上很多都不管用,已亲测管用
[[email protected] ~]# cat .bash_profile #root目下添加代理上网,蓝色代码
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
http_proxy=192.168.20.228:8889
export http_proxy
[[email protected] ~]# source .bash_profile #执行代理设置
[[email protected] ~]# curl ifconfig.me #查看代理所在的公网IP
14.154.235.9
时间: 2024-10-27 13:44:10