Type : System
Operating System : Linux
This howto provide a solution if you want to update your linux server when this server is behind a proxy server.
CONFIGURE YUM.CONF
yum.conf before the modification.
# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h
installonly_limit = 5
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
Now we have to modify yum.conf and add the good option.
Add this options in you yum to pass through the proxy server.
http_proxy=http://proxy_ip:port
Add those options, if you need to use authentification on the proxy server.
proxy_username=proxy_user_name
proxy_password=proxy_user_password
EXAMPLE
yum.conf with authentification
[main]
http_proxy=http://proxy.generationip.com:3128
proxy_username=proxyuser
proxy_password=proxypassword
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h
installonly_limit = 5
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d