yum proxy



Yum proxy, get yum working behind proxy server on Linux Fedora system.  This step by step example showhow to get yum working.

Yum Proxy

1.  Open Linux terminal, and execute su - command on terminal...

2.  vi /etc/yum.conf to open yum configuration file


3.  hit 'i' key to enter vi insert mode

4.  type in your proxy server and port number.
[main]
proxy=http://172.16.160.119:8080
cachedir=/var/cache/yum/$basearch/$releasever
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.  Hit 'esc' key twice to exit vi insert mode and, press and hold 'shift' key and hit 'ZZ' key to save the configuration.

6.  now verify by executing 'yum -y update', if yum error as show on exemple below
[root@localhost ~]# yum -y update
Loaded plugins: langpacks, presto, refresh-packagekit
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
[root@localhost ~]#
 
7.  try execute 'yum clean all' to clear all yum cache and try to execute yum update again... if error again try check and verify your network connection and yum proxy configuration again...



0 comments: