Subscribe:

Ads 468x60px

Pages

Thursday, July 7, 2011

Yum Configuration

1) check the vsftpd is intalled or not
# rpm -qa | grep vsftpd

If vsftpd not installed then install it
# rpm -ivh ftp://192.168.0.254/pub/Server/vsftpd* --force


2) check the createrepo is intalled or not
# rpm -qa | grep createrepo

If createrepo not installed then install
# rpm -ivh ftp://192.168.0.254/pub/Server/createrepo* --force

3) If you Linux OS software package is avaliable at remote location(192.168.0.254:/var/ftp/pub/) then mount to /mnt:
# mount 192.168.0.254:/var/ftp/pub/ /mnt/
# cp -avf /mnt/* /var/ftp/pub/
# umount /mnt

If you have Linux OS cd/dvd then type:
# mount /dev/cdrom /mnt
# cp -avf /mnt/* /var/ftp/pub/
# umount /mnt

For display the size of /var/ftp/pub continuously:
# watch du -h /var/ftp/pub

4)Copy grouping files:
# cp /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /root
# cp /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /root

5)Clear the old repos:
# rm -rf /var/ftp/pub/Server/repodata
# rm -rf /var/ftp/pub/VT/repodata

6)Repo creation :
# createrepo -g /root/comps-rhel5-server-core.xml -v /var/ftp/pub/Server
# createrepo -g /root/comps-rhel5-vt.xml -v /var/ftp/pub/VT

7) Create a file called server1.repo at /etc/yum.repos.d
For server:
-----------
vi /etc/yum.repos.d/server1.repo
[Server]
name=Server1 Server Repository
baseurl=file:///var/ftp/pub/Server
gpgcheck=0

# This one is needed for xen packages
[VT]
name=Server1 VT Repository
baseurl=file:///var/ftp/pub/VT
gpgcheck=0

8) Create a file called client.repo at /etc/yum.repos.d
For client:
-----------
# vi /etc/yum.repos.d/client.repo
[Server]
name=Server1 Server Repository
baseurl=ftp://192.168.0.254/pub/Server
gpgcheck=0

# This one is needed for xen packages
[VT]
name=Server1 VT Repository
baseurl=ftp://192.168.0.254/pub/VT
gpgcheck=0

9) checking the list of packages
# yum clean all
# yum list


Please feel free to comment to make it more useful to everyone.

0 comments:

Post a Comment