Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to create a local Yum repository you will need to install the createrepo package via Yum as follows:

Code Block

yum install createrepo

Create Local Yum Repository

  1. Copy the RPMs that will be included in the repository to a shared directory, e.g. /mnt/rpms/;
  2. Run the createrepo command, e.g.:
Code Block

createrepo /mnt/rpms

The createrepo application will generate a repodata directory underneath /mnt/rpms directory. Inside the directory you will find the following files:

...

At this point you can either access the Yum repo where it sits on the file system or you can move the contents of the directory (rpms and repodata) to another location that is accessible to Yum. The key is to create a .repo file (within /etc/yum.repos.d) that points to the location of the RPMs and repodata. The example below shows a .repo that points to to the /mnt/rpms directory for access to the repository on a local machine:

Code Block

[ikanow]
name=Infinit.e Repository
baseurl=file:///mnt/rpms
gpgcheck=0

The following example is a repo file that points yum to a repository accessible via the web (note that the infinit.e-repos directory could be a virtual directory pointing to /mnt/rpms):

Code Block

[ikanow]
name=Infinit.e Repository
baseurl=http://www.ikanow.com/infinit.e-install-reposrepo
gpgcheck=0

.