Created
May 4, 2024 23:57
-
-
Save neofob/be832f1331f976f17489efbc6c521624 to your computer and use it in GitHub Desktop.
Create Rocky Linux 9 repo mirror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
dnf install -y rsync createrepo yum-utils | |
yum install epel-release -y | |
mkdir -p /var/www/html/rocky-9-mirror | |
reposync -gpgcheck -n -d 1 -m \ | |
--repoid=appstream \ | |
--repoid=baseos \ | |
--repoid=epel \ | |
--repoid=epel-cisco-openh264 \ | |
--repoid=extras \ | |
--newest-only \ | |
--download-path=/var/www/html/rocky-9-mirror | |
# Now you can serve the repos at /var/www/html/rocky-9-mirror/{appstream,baseos,epel,epe-cisco-openh264,extras} | |
# References: | |
# * reposync --help | |
# * https://github.com/piwi3910/docker-reposync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment