centos 6.4 系统代理上网 设置

前面讲了yum 代理设置上网的方法,现在设置一下系统代理上网,

网上很多都不管用,已亲测管用    

[root@proxy ~]# 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

[root@proxy ~]# source .bash_profile    #执行代理设置

[root@proxy ~]# curl ifconfig.me       #查看代理所在的公网IP
14.154.235.9

************************************************

http_proxy = http://username:password@yourproxy:8080/
ftp_proxy = http://username:password@yourproxy:8080/
proxy_username=username

proxy_password=password

export http_proxy
export ftp_proxy

 

posted @ 2015-04-30 17:18  wz0314  阅读(404)  评论(0编辑  收藏  举报