Monday, April 6, 2015

Yum configuration

Local YUM Server in RHEL 6.X/Centos 6.X

Yum Configuration

Yum Server Side Configuration

  1. Install the vsftpd Package to share the Repository in our client systems.rpm –ivh vsftpd-2.2.2-6.el6.i686.rpm
  2. Start the service vsftpd
    service vsftpd start
  3. Install the deltarpm package
    rpm –ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
  4. install the Python-deltarpm package
    rpm –ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm 
  5. Install the Createrepo package, it is used to create our local repository
    rpm –ivh createrepo-0.9.8-4.el6.noarch.rpm
  6. After Installation we can see .repo files in below mensioned path
    "/etc/yum.repos.d/example.repo"
    [examplerepo]
    name=Example Repository
    baseurl=http://mirror.cisp.com/CentOS/6/os/i386/
    enabled=1
    gpgcheck=1
    gpgkey=http://mirror.cisp.com/CentOS/6/os/i386/RPM-GPG-KEY-CentOS-
  7. We can download CentOS DVD ISO directly wget http://mirror.lihnidos.org/CentOS/6.4/isos/i386/CentOS-6.4-i386-LiveDVD.iso
  8. Mount CentOS DVD ISO
    mount -o loop /path/to/iso /mnt

     
  9.  Create YUM Repository Configuration file
    /etc/yum.repos.d/centosdvdiso.repo
    [centosdvdiso]
    name=CentOS DVD ISO
    baseurl=file:///mnt
    enabled=1
    gpgcheck=1
    gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-6
  10. Create YUM Repository 

    createrepo /repository1