Skip to content

Instantly share code, notes, and snippets.

@neofob
Created May 4, 2024 23:57
Show Gist options
  • Save neofob/be832f1331f976f17489efbc6c521624 to your computer and use it in GitHub Desktop.
Save neofob/be832f1331f976f17489efbc6c521624 to your computer and use it in GitHub Desktop.
Create Rocky Linux 9 repo mirror
#!/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