會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

Linux » yum client 的 proxy 設定

發表人: jhliang, 十級學員
2007-10-16 17:27:26
由於網路安全的議題,往往機器會架設在intranet內,並透過proxy連到外面,但這樣一來使的套件更新時會變的有點麻煩。
解法很簡單,就是透過修改yum的設定檔,告訴yum 透過 proxy server 去更新。

1.修改 /etc/yum.conf

2.找個地方加入這一行
proxy=http://proxy_ip:port


done!

參考網址
如何使用YUM管理軟件

發表人: ofather, 九級學員
2010-03-31 12:50:06


使用 pac 檔無法正常存取,EX:
#proxy=http://XXX.123.com/proxy.pac
proxy=http://10.160.3.88:8080

發表人: andowson, 七段學員
2010-03-31 13:50:55
剛查了一下,原來PAC(proxy auto-config)檔一般是用來給瀏覽器使用的,因為其檔案內容通常是一個JavaScript函式FindProxyForURL(url, host),一般的程式通常無法執行JavaScript,所以對於非瀏覽器的應用程式遇到需要設定proxy時,只能乖乖設定IP:port這種格式。

參考資料:
http://en.wikipedia.org/wiki/Proxy_auto-config
A proxy auto-config (PAC) file defines how web browsers and other user agents can automatically choose the appropriate proxy server (access method) for fetching a given URL.

A PAC file contains a JavaScript function "FindProxyForURL(url, host)". This function returns a string with one or more access method specifications. These specifications cause the user agent to use a particular proxy server or to connect directly.




會員註冊 / 登入  |  電腦版  |  Jump to top of page