Configuring yum to use an HTTP or FTP proxy

I have been experimenting with squid at home, and recently configured yum to use the squid proxy server I set up. There are two ways you can get yum to use an HTTP or FTP proxy. First, you can make yum use a proxy for a single session by setting the http_proxy and ftp_proxy environment variables:

$ export http_proxy=http://proxy:3128

$ export ftp_proxy=http://proxy:3128

$ yum update

If you want to make the proxy settings permanent, you can add a proxy directive to /etc/yum.conf:

$ grep proxy /etc/yum.conf proxy=http://proxy:3128

If your proxy requires you to authenticate, you can add the credentials to the configuration file as well.

This article was posted by Matty on 2009-11-29 12:11:00 -0400 -0400