当前位置: > Linux教程 > Linux学习 >

linux 中yum 和wget代理设置

时间:2016-12-28 16:15来源:linux.it.net.cn 作者:IT

yum 设置代理:

/etc # vi yum.conf 

-----------------------------

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

##添加这句话
proxy=http://10.10.112.251:10001


#  This is the default, if you make this bigger yum won't see if the metadata

 

-------------------------------------------

 

wget 设置代理:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://10.10.112.251:8087/
http_proxy = http://10.10.112.251:8087/
#ftp_proxy = http://proxy.it.net.cn:18023/


# If you do not want to use proxy at all, set this to off.
use_proxy = yes




(责任编辑:IT)
------分隔线----------------------------