Red Hat Enterprise Linux 7 – how to enable proxy settings for ‚yum‘ command

This can be easily achieved with ‚yum‘ command config file “/etc/yum.conf“ – under [main] section define the proxy settings like below

[main]
proxy=http://<Proxy-Server-IP-Address>:<Proxy_Port>
proxy_username=<Proxy-User-Name>
proxy_password=<Proxy-Password>

Just for the verification you can run beneath command to see whether you are able to fetch the packages or not

# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
repo id                                                    repo name                                                          status
rhel-7-server-rpms/7Server/x86_64                          Red Hat Enterprise Linux 7 Server (RPMs)                           26,315
repolist: 26,315

Leave a Reply

You must be logged in to post a comment.