8.4.6. Creating a Yum Repository
- Install the createrepo package. To do so, type the following at a shell prompt as
yum install createrepo
- Copy all packages that you want to have in your repository into one directory, such as
- 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 up
ImportantCompared 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 the
createrepocommand on Red Hat Enterprise Linux 5 to create the package metadata for Red Hat Enterprise Linux 6.