Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

yum via authentication proxy in Fedora/CentOS/RHEL5

Type: Code Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Beginner Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2010-Jan-31
Networking, Programming and Graphics - Tutorials
Visited: 998 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Stephen Think

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
/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.
[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:
http_proxy=http://1.2.3.4:8080/
proxy_user=user
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.
Rate this tutorial:                    
Post Comment

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: