Monday, August 15, 2011

How to create Yum repo in Redhat 5

Create Yum Server and Yum Client

Create FTP base Yum server
  Insert RHEL 5 Dvd
   #mkdir -p /var/ftp/pub 
    Create Pub Folder
   #cd /media
   #cd RHEL
    Go to the Media
   #cp -av* /var/ftp/pub
     Copy all DVD in to the /var/ftp/pub Directory
   # cd /var/ftp/pub/Server
    Go to Server Folder
   #rpm -ivh vsftpd-12.42.5.2.5.el5.rpm
   #rpm -ivh createrepo-232.32.4.el5.rpm
   Install flowing Packages
   #services vsftpd start
   Start FTP service
   #chkconfig vsftpd on
   make it a default on
   #cd ..
   #createrepo -v /var/ftp/pub
  Create Repository for all packages
  Create one file in /etc/yum.repos.d/server.repo and configure it
   #vi /etc/yum.repo.d/server.repo
   [server]
   name=yum server
   baseurl=ftp://IP Address/pub (local Server IP Address)
   enabled=1
   gpgcheck=0
  #yum clean all
  #yum list all
  #yum install package name
 Now server is configure

How to create yum client
Create one file in /etc/yum.repos.d/client.repo
#vi /etc/yum.repos.d/client.repo
 [client]
name=yum client
baseurl=ftp://yumserver IP address/pub
enabled=1
gpgcheck=0
:wq

#yum clean all
#yum install package name
Yum client is Configure

No comments:

Post a Comment