在玩虚拟机centos里,经常需要设置代理,绕过一些网络限制.
在使用root用户登录情况下,方法如下:
l临时
# export http_proxy=http://proxy.example.com:port
# export https_proxy=http://proxy.example.com:port
永久
# vi /etc/yum.conf
proxy=http://xxx.xxx.xxx.xxx:xxxx
proxy_username=用户名
proxy_password=密码
ok,再试试.