Apr 24, 2010

YUM Server Configuration

YUM Server Configuration

1) Install the below packages

    #rpm -ivh createrepo*
    #rpm -ivh vsftpd*

2) Create one directory to save all rpm and share it via ftp.

    #mkdir /data/yum

3) Mount the DVD media and copy all the rpm files to the created folder.
   
    #mount /dev/cdrom /mnt
    #cd /mnt/RHEL5.0 DVD/Server
    #cp . -rf /data/yum

4) Change the default ftp location to /data

    #vi /etc/vsftpd/vsftpd.conf

        add the below entry at the end of the file.
   
    anon_root=/data

5) create a repomd (xml-based rpm metadata) repository from a set of rpms.

    #createrepo -v /data/yum

6) Create a repo file

    #vi /etc/yum.repos.d/yum.repo
    [yum]
    name=yum
    baseurl=file:///mugu/yum
    enabled=1
    gpgcheck=0

7) Now check the configuration by install or remove on group of package

    #yum install dhcpd



Client Side Configuration:

8) Create a repo file

    #vi /etc/yum.repos.d/yum.repo
    [yum]
    name=yum
    baseurl=ftp://IPADDRESS(server)/yum
    enabled=1
    gpgcheck=0

Note:

    If you are using yum server means in both server and client always have ftp service running

9) In both server and client start the ftp service

    #service vsftpd start
    #chkconfig vsftpd on

No comments: