Enable yum update through proxy server on Linux Fedora
Step by Step Enable yum to Update Fedora Through Proxy Server.
How to update Fedora if your network internet connection using proxy server??? The answer is simple... edit and configure yum.conf to enable update through proxy server. The article below show you the step by step enable yum update through proxy server on Linux Fedora system. The step by step example below start from editing the yum.conf file and then test yum update through proxy server. Please note that you may need root privileges to update and using yum command, so enter root password when needed.
Enable yum update Fedora through proxy:
1. Backup yum.conf configuration file before we start edit the yum.conf file. Please key in root password when ask..
[fedora10@fedora ~]$ su -c "cp -pr /etc/yum.conf /etc/yum.conf.bak"
Password:
[fedora10@fedora ~]$
2. To enable yum through proxy server, open the yum.conf configuration file as show on example below.
[fedora10@fedora ~]$ su - -c "gedit /etc/yum.conf"
Password:
3. Edit yum.conf and put the http proxy server address and proxy port number in yum.conf main section as show on example below...
[main]
proxy=http://172.16.160.120:8080
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
4. If the proxy server require a user name and password... edit the yum.conf and add proxy user username and add proxy user password as show on example below.... make sure that you save the configuration to apply changes.
[main]
proxy=http://172.16.160.120:8080
proxy_username=put_proxy_user_name_here
proxy_password=put_proxy_user_password_here
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
5. Then execute yum clean all command to clean/clear yum cache file as show on example below.
[fedora10@fedora ~]$ su - -c "yum clean all"
Password:
Loaded plugins: refresh-packagekit
Cleaning up Everything
[fedora10@fedora ~]$
6. Then execute yum update command as show on example below, to test that yum can be use through proxy server (yum update through proxy server :-).
[fedora10@fedora ~]$ su - -c "yum update"
Password:
Loaded plugins: refresh-packagekit
Keywords: yum through proxy, update fedora through proxy, using yum through proxy, enable yum through proxy, yum update through proxy, yum through squid proxy, yum through proxy server, yum proxy
- 31704 reads
- Email this page
5 comments
It is so easy and works best.
Submitted by Maaz Rehan (not verified) on Sun, 04/01/2012 - 00:03.It is so easy and works best.
best tutorial to understand
Submitted by somi nagababu (not verified) on Mon, 04/23/2012 - 18:41.best tutorial to understand how to configure yum when using proxy server with username and password
Still I am not able to use yum
Submitted by Albert (not verified) on Wed, 05/23/2012 - 13:06.Hi,
I followed the above steps. Still I am not able to run yum list.
I am using Centos 6.2.
And our proxy is password protected.
I am able to ping google.
Can you please tell what may be the problem?
Thanks
Still I am not able to use yum
Submitted by Albert (not verified) on Wed, 05/23/2012 - 13:06.Hi,
I followed the above steps. Still I am not able to run yum list.
I am using Centos 6.2.
And our proxy is password protected.
I am able to ping google.
Can you please tell what may be the problem?
Thanks
thanks dude!mine now works
Submitted by ahmednur (not verified) on Thu, 09/20/2012 - 07:40.thanks dude!mine now works like a charm!