Run “yum” behind proxy on Oracle Enterprise Linux

It took me sometime to figure out. I wish I did a simple google to learn more about “yum.conf” file.

If the server is behind a proxy, like almost all work networks are, you’d need to setup the proxy at the system level or add the proxy server information in the ‘yum’ configuration file.

The typical location for the configuration file is under /etc

Edit the file:

/etc/yum.conf

and add the following line.

proxy=serverhost:portnumber

My file looks like:

[main]
cachedir=/var/cache/yum/$basearch/$relserver
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
plugins=1
installonly_limit=3
proxy=serverhost:portnumber*

* Enter your actual proxy server host and portnumber

Leave a comment