
You also need to update the repositorie’s package database. Adding them to your Packages directory isn’t enough to make it available to clients. Usually you will want to add new packages or package updates. The initialization step creates the database and prepares the directory to host the repository, allowing clients to connect to it. This is how it can provide you with all the packages required to be installed so quickly. Repositories use a simple database to keep track of all the packages and their dependancies. Add your RPM packages to the directory we just created.Create a new directory for the repository.When dealing with multiple Red Hat based distributions and versions, it’s best to create a directory structure that’s easy to understand and manage. My repository will created in /repos/CentOS/6/5/. For the purpose of showing how to create a repo, I’ll just be adding it to the root volume. Ideally, you will want the repository to be in its own volume, and preferably on its own disk. Your repository needs a directory where the package are stored. If you do not have access to the Internet, you can install by using the Red Hat or CentOS installation disc as a repository.Ĭreate the Repository Prepare Repository Directory To create and intialize your Yum repository, you must first download and install the createrepo package – available from the default CentOS repos. There are a few ways to give your other servers access to it, including HTTP, FTP, and NFS.

And I promise, it is actually really simple. This tutorial will show you how to configure a Yum repository server.

Another may be that you develop and maintain your own software and need a central location to store it, where other servers can easily access it. You may be in an isolated network that has no connection to the outside world, yet you still want to keep your servers up-to-date or have all of the default packages available. PackageKit-glib 1.1.12-6.el8 rhel-8-for-x86_64-appstream-rpmsĪbattis-cantarell-fonts 0.0.25-6.There are many reasons why you may want to have a local repository for your Red Hat or CentOS servers.
