How to enable Proxy Settings for Yum Command on RHEL?

Solution Verified - Updated

Environment

Red Hat Enterprise Linux 5, 6, 7, 8, 9, and 10

Issue

Need to enable Proxy Settings for Yum

Resolution

To configure yum to use a proxy, modify the /etc/yum.conf file with the following :

proxy=http://proxy-server-IP-address>:<proxy_port> 
proxy_username=<proxy-user-name>
proxy_password=<proxy-password>
SBR
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.