Beruflich Dokumente
Kultur Dokumente
Date:18-09-2008
What is Yum: Yum stands for Yellow dog Updater,Modified. Yum is an automatic updater and package
installer/remover for rpm systems. It automatically computes dependencies and figures out what things
should occur to install packages. It makes it easier to maintain groups of machines without having to
manually update each one using rpm. You can use a single yum command to install as many packages
as
you want; just add each package name to the end of the command.
Features include:
Multiple Repositories
Simple config file
Correct dependency calculation
Fast operation
rpm-consistent behavior
comps.xml group support, including multiple repository groups
Simple interface
Summary:
1. Create the directory structure of the repository
2. Copy the base RPMs
3. Create the base repository headers
4. Edit yum.conf
Server Side:
*Check that the createrepo rpm is installed in your system with this command
#rpm -qa createrepo
If command doesn't give any output you should install this rpm from Cds/DVD of RHEL5. Locate the
createrepo rpm from your RHEL5 Cds/DVD and give this command
# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
-------output--------------
warning: createrepo-0.4.4-2.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
*Create the directories named yum and RPMS5 in /var/ftp/pub with this command
#mkdir -p /var/ftp/pub/yum/RPMS5
*Copy the RPMs from the Cds/DVD to /var/ftp/pub/yum/RPMS5
----output------
2199/2199 - junit-javadoc-3.8.2-3jpp.1.i386.rpm
This might take some time, depending upon the speed of your processor(s)
and HD. On successful conclusion, createrepo should create a directory /repodata in RPMS5 directory.
The contents should be:
filelists.xml.gz, other.xml.gz, primary.xml.gz, repomd.xml
*Now you can install any rpms on client systems by editing /etc/yum.conf file
Client Side:
[RPMS]
baseurl=ftp://192.168.0.9/pub/yum/RPMS5
enabled=1
*Now on client system the /etc/yum.com file looks like this
*********************************************************************
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
metadata_expire=1800
# in /etc/yum.repos.d
[RPMS]
baseurl=ftp://192.168.0.9/pub/yum/RPMS5
enabled=1
****************************************************************
#yum list available :- Is used to list various information about available packages on repository
server
removed.
*For more commands refer man pages of yum by
#man yum
NOTE: If you want to yum repository communication between client and yum server by “http” add the
this to your yum repository server http.conf file
<VirtualHost 192.168.0.9:80>
ServerAdmin webmaster@server.example.com
ServerName 192.168.0.9
DocumentRoot "/var/ftp/pub/yum/RPMS5/"
ErrorLog logs/server.example.com-error_log
CustomLog logs/server.example.com-access_log common
</Virtualhost>
_______________________________
END_________________________________________________