In most of the data center direct Internet connection is not allowed on Unix and Windows Servers. If we need to download anything from Internet, we have to go through via some proxy servers.
In case of Linux Servers whenever we need to install new packages and apply patches in such scenarios, we need to set proxy for yum command.
This can be easily achieved with yum config file "/etc/yum.conf" editting. Under main section define the proxy settings like below.
Below is an example: