เทคนิคดีๆ ใช้ประจำๆ yum โดยใช้ proxy server

By | 14/08/2011

To enable yum operations to use a proxy server you should first add the following parameter to /etc/yum.conf

proxy=http://yourproxy:8080/  

where yourproxy is the name of the proxy server you want to access and 8080 is the proxy port. If the server requires authentication you can specify the login credentials like:

proxy=http://username:password@yourproxy:8080/ 


The rpm package manager makes use of the proxy environment variable. This can be set system wide in /etc/profile or user specific in ~/.bash_profile::

export http_proxy=http://yourproxy:8080/ export ftp_proxy=http://yourproxy:8080/ 

To use wget throug a proxy server add the following lines to /etc/wgetrc

http_proxy = http://yourproxy:8080/  ftp_proxy = http://yourproxy:8080/  

In both cases, login information can be set like in the example above.

From: 11. Using yum with a proxy server

ใส่ความเห็น