Ce contenu n'est pas disponible dans la langue sélectionnée.
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_repo
This creates the necessary metadata for your Yum repository, as well as the sqlite database for speeding upyum
operations.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 thecreaterepo
command on Red Hat Enterprise Linux 5 to create the package metadata for Red Hat Enterprise Linux 6.