Friday, 2 March 2012

Local Yum Repository On Red Hat 6/CentOS 6

00:35 Posted by Birender No comments

1.      Create a directory for RPMs
              mkdir /yum-repos
2.      
            Copy All the Packages from Red Hat Installer DVD
     cp -rp /media/REDHATDVD/Packages/* /yum-repos
3.        
       Now install createrepo
     cd /yum-repos
     rpm –ivh createrepo*
4.      
              Now run this command

     createrepo -v /yum-repos/Packages
5.  
                Now create a file
              
              vim /etc/yum.repos.d/yum-server.repo
6.    
                And add  following lines(all are necessary)

     [mylocalnet]
      name=red hat $basearch
      baseurl=file:///yum-repos/Packages
      enabled=1
      gpgcheck=0

0 comments:

Post a comment

Note: only a member of this blog may post a comment.