Search This Blog

Tuesday, July 13, 2010

HOWTO: Configure YUM to work behind a proxy



If you are running your Redhat/Centos or Fedora machine in an enterprise environment you may be sitting behind a network proxy server like squid.

If you try and update or install software it will fail with timeouts or errors contacting the repository mirrors.

To configure YUM to work with your proxy server you need to add the following line to your /etc/yum.conf file.

Anonymous proxy configuration:
proxy=http://yourproxyip:port/

If your proxy server requires authentication add the following lines to your /etc/yum.conf file instead.

proxy=http://yourproxyip:port/
proxy_username=youruser
proxy_password=yourpassword

 You will be able to update and install software now, give it a go!