- 相關(guān)推薦
關(guān)于CentOS中怎么去設(shè)置系統(tǒng)級(jí)代理
YUM代理設(shè)置
編輯/etc/yum.conf,在最后加入
# Proxy
proxy=http://username:password@proxy_ip:port/
也可以使用proxy_username和proxy_password來配置代理的用戶名和密碼
這樣的配置完成后,所有的用戶在使用yum時(shí),都會(huì)使用代理,可以說是全局代理。
如果需要為單獨(dú)的用戶配置代理,可以在用戶的~/.bash_profile中設(shè)置。
Wget的代理設(shè)置
編輯/etc/wgetrc,在最后加入
# Proxy
http_proxy=http://username:password@proxy_ip:port/
ftp_proxy=http://username:password@proxy_ip:port/
系統(tǒng)全局代理
如果需要為某個(gè)用戶設(shè)置一個(gè)系統(tǒng)級(jí)的代理,可以在~/.bash_profile中設(shè)置:
http_proxy="http://username:password@proxy_ip:port"
export_http_proxy
上面的設(shè)置只對(duì)某個(gè)用戶生效,如果要對(duì)所有系統(tǒng)用戶生效,寫在/etc/profile中就可以了。
【CentOS中怎么去設(shè)置系統(tǒng)級(jí)代理】相關(guān)文章:
怎么設(shè)置Win10系統(tǒng)虛擬內(nèi)存10-13
關(guān)于edius中怎么設(shè)置Alpha轉(zhuǎn)場特效11-26
“系統(tǒng)管理員設(shè)置了系統(tǒng)策略禁止進(jìn)行此安裝”怎么解決11-27
交換機(jī)怎么設(shè)置10-08
路由器怎么設(shè)置11-26
IPv6怎么設(shè)置11-27
安裝系統(tǒng)時(shí)若分配有系統(tǒng)保留分區(qū)需先設(shè)置驅(qū)動(dòng)器號(hào)怎么辦11-27