因公司网络实名制,而无Linux客户端,只能采用代理方式上网和更新了。
yum:
edit /etc/yum.conf add follow:
# The proxy server - proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty
wget:
方法1:
set "http_proxy=http://[user]:[pass]@host:port/"
wget -Y on "http://baidu.com"方法2:
wget -e "http_proxy=http://[user]:[pass]@host:port/" http://baidu.com
方法3:
配置步骤:
1、创建$HOME/.wgetrc文件
2、编辑文件,添加如下内容:
#===========Sample of wgetrc=================
#添加代理服务器
http_proxy = www.yourproxy.cc
#以下几种格式也可以,如果不写端口,缺省为80
#http_proxy = www.yourproxy.cc:8080
#http_proxy = http://www.yourproxy.cc
#http_proxy = http://www.yourproxy.cc:8080/#如果不使用代理服务器,此处设置为off
use_proxy = on
#============================================3、运行wget
方法4:
安装socks客户端工具runsocks(正常安装socks5后自带)。在libsocks5.conf文件里加入所要使用的代理服务器。
注意:运行wget之前需要将wgetrc中的代理服务器注释掉
配置完毕后运行如下命令:
#runsocks wget -m [http://site1 | ftp://site2]
经测试,可以正常镜像http和ftp站点。