How to run Yum bind proxy in Centos7

The Yellowdog Updater, Modified (yum) is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager.Though yum has a command-line interface, several other tools provide graphical user interfaces to yum functionality. (wikipedia)

Schools and companies  are introducing  proxy servers to have more control  about  them network.

lets  show you how to use yum bind proxy.

My system



[[email protected] certs]# yum   install  firefox



Solution: Configure Yum to use the Proxy.

edit /etc/yum.conf

vi  /etc/yum.conf

and  add this bellow of the file

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
# The proxy server - proxy server:port number
proxy=http://proxy-ip:8080  # in this example the port can be other ports  
# The account details for yum connections
proxy_username=domain\username     # if you don't have domain put only  username

save and exit

you dont have to reboot or restart things

Try again :

[[email protected] certs]# yum   install  firefox
Loaded plugins: fastestmirror, langpacks
base                                                                                                                | 3.6 kB  00:00:00
extras                                                                                                              | 3.4 kB  00:00:00
updates                                                                                                             | 3.4 kB  00:00:00
(1/4): base/7/x86_64/group_gz                                                                                       | 155 kB  00:00:00
(2/4): extras/7/x86_64/primary_db                                                                                   | 101 kB  00:00:00
(3/4): updates/7/x86_64/primary_db                                                                                  | 3.1 MB  00:00:00
(4/4): base/7/x86_64/primary_db                                                                                     | 5.3 MB  00:00:00
Determining fastest mirrors
 * base:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package firefox.x86_64 0:38.6.1-1.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                       Arch                         Version                                    Repository                     Size
 firefox                       x86_64                       38.6.1-1.el7.centos                        updates                        72 M

Transaction Summary
Install  1 Package

Total download size: 72 M
Installed size: 131 M
Is this ok [y/d/N]: y
Downloading packages:
firefox-38.6.1-1.el7.centos.x86_64.rpm                                                                              |  72 MB  00:00:09
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : firefox-38.6.1-1.el7.centos.x86_64                                                                                      1/1
  Verifying  : firefox-38.6.1-1.el7.centos.x86_64                                                                                      1/1
  firefox.x86_64 0:38.6.1-1.el7.centos

[[email protected] certs]#