yum via authentication proxy in Fedora/CentOS/RHEL5

Date: January 31st, 2010
Author: Stefan Batanov

This tutorial we will teach you something that most may need to use just for a few times in their Linux experience but will be very happy that such functionality actually exists at first place. Common Linux users, including me, are not so used to get updates through a proxy. Maybe used a proxy server once or twice some time ago but I have totally forgotten that proxies even existed in the Internet.

However if one day it happens that you find yourself in a corporate network and need to update a package as it currently doesn”t work as expected (unfortunately we all have to admit that this is something common for Linux distributions, not only under RedHat based systems) you will have to pass through a proxy.

For such cases after you finish reading this tutorial you will know how to configure yum for using proxy with basic authentication.

The configuration file for yum is located in /etc directory

  1. /etc/yum.conf

You will need root privileges to edit yum.conf file. Open it with your favorite editor. In our example we use vi.

  1. [root@localhost ~]#vi /etc/yum.conf

The file generally is separated in several sections. The one we need is [main]. Please make sure you put the code bellow at the bottom of the main section.In case the proxy doesn”t require username or password you can delete that part.

Put in your yum.conf the following:

  1. http_proxy=
  2. proxy_user=user
  3. proxy_password=password

No restarts are needed. yum.conf will be checked next time you run yum command

If you want to learn how to make wget work through a proxy click in the link.

VN:F [1.9.18_1163]
Rating: 1.3/10 (11 votes cast)
yum via authentication proxy in Fedora/CentOS/RHEL5, 1.3 out of 10 based on 11 ratings

Leave a Reply