How do I use a yum server if my system is behind a proxy server?
A: To configure yum to use a proxy for all users on a systen, add your proxy server details to /etc/yum.conf. Note that both a http://or https:// prefix and TCP port are required.
proxy=http://proxy.mydomain.com:8080
If your proxy server requires authentication, add these settings to /etc/yum.conf:
To configure a proxy server for a single user or session, set the https_proxy or http_proxy environment variable and optionally add these settings to ~/.bash_profile. Note that a protocol prefix is optional:
If you've configured proxy settings for a non-root user or session only, remember that many yum commands require root privileges. So, when using sudo, you must use -E to preserve the existing environment. For example: