因公司網絡實名制,而無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站點。