Show Table of Contents
8.4.6. Creating a Yum Repository
To set up a Yum repository, follow these steps:
- Install the createrepo package. To do so, type the following at a shell prompt as
root:yum install createrepo - Copy all packages that you want to have in your repository into one directory, such as
/mnt/local_repo/. - Change to this directory and run the following command:
createrepo --database /mnt/local_repoThis creates the necessary metadata for your Yum repository, as well as the sqlite database for speeding upyumoperations.Important
Compared to Red Hat Enterprise Linux 5, RPM packages for Red Hat Enterprise Linux 6 are compressed with the XZ lossless data compression format and can be signed with newer hash algorithms like SHA-256. Consequently, it is not recommended to use thecreaterepocommand on Red Hat Enterprise Linux 5 to create the package metadata for Red Hat Enterprise Linux 6.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.