YUM RPM repositary creation in LINUX : How to ??

1. Copy all RPM files to /var/ftp/pub/server
2. Install the createrepo rpm (If its not inistalled)

   #rpm -ivh createrepo-0.4.10-1.el5.rf.noarch.rpm

3. vi /etc/yum.repos.d/myrpm.repo
[myrpm]
name=repository
baseurl=file:///var/ftp/pub/Server (Use ftp URL to setup this in client side)
enabled=1
keepcache=0
(there should not be any other *.repo file exists..remove or rename the other repositories file)
4. createrepo -v /var/ftp/pub/Server
5. yum clean all
6. yum update



If you want to manually enable and use Yum then use the below command

# vi /etc/yum.repos.d/myrpm.repo
[myrpm]
name=repository
baseurl=file:///var/ftp/pub/Server (Use ftp URL to setup this in client side)
enabled=0 
keepcache=0

save and exit

(note : i modified the enabled as "0")

Now yum won't automatically use the repo by default. This is to avoid conflict between packages from the official repos and your repo.
Now you need to use the below command to use ur own repo.

#yum --enablerepo=myrpm install


Post a Comment

0 Comments