Tuesday, August 24, 2010

Yum Configuretion

Why to use YUM ? Why not RPM ?
The rpm command-line utility has many functions for working with
individual RPM packages. You may use it to manually install and remove packages from your system. If you install software with the rpm utility, you must
manually check and install any dependencies. For this reason, pirut and yum are the recommended methods for installing software.
#####################################################

What YUM does ?
Use the yum utility to modify the software on your system in four ways:
· To install new software from package repositories
· To install new software from an individual package file
· To update existing software on your system
· To remove unwanted software from your system
####################################################
/etc/yum.conf <----- Configuration File
/etc/repos.d/ <----- Repository directory
####################################################


How to setUP local YUM repository ?

1. Mount rhel5 DVD
# mount /dev/hdb /mnt

2. Install vsftpd package
# rpm -ivh vsftpd-2.0.5-10.el5* --force --aid

3. Copy complete DVD into /var/ftp/pub directory.
# cd /mnt
# cp -rf * /var/ftp/pub

# mv /var/ftp/pub/Server/repodata /tmp

# mkdir /tmp/VT
# mv /var/ftp/pub/VT/repodata /tmp/VT

4. To Create repomd (xml-rpm-metadata) repository
# cd /mnt
# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm --force --aid
# createrepo -g /tmp/repodata/comps-rhel5-server-core.xml /var/ftp/pub/Server
# createrepo -g /tmp/VT/repodata/comps-rhel5-vt.xml /var/ftp/pub/VT
# createrepo /var/ftp/pub/images

5. Start the ftp service
# service vsftpd restart

6. To configure repo file.
# cd /etc/yum.repos.d/
# cp rhel-debuginfo.repo base.repo

7. To configure base.repo file
# vi base.repo
[base]
name=server data
baseurl=ftp://192.168.0.254/pub/Server
gpgcheck=0

8. # cp base.repo base1.repo base2.repo
# vi base1.repo
[base1]
name=server data
baseurl=ftp://192.168.0.254/pub/VT
gpgcheck=0

# vi base2.repo
[base2]
name=server data
baseurl=ftp://192.168.0.254/pub/images
gpgcheck=0