Skip to content

Instantly share code, notes, and snippets.

@gsdevme
Last active March 20, 2018 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsdevme/c32395a418d3115a6f7dca6e3e57acae to your computer and use it in GitHub Desktop.
Save gsdevme/c32395a418d3115a6f7dca6e3e57acae to your computer and use it in GitHub Desktop.
centos-mirror-on-raspberry-pi
sudo raspi-config --expand-rootfs && \
    sudo su - -c 'echo "CONF_SWAPSIZE=1000" > /etc/dphys-swapfile' && \
    sudo reboot

sudo apt-get update && \
    sudo apt-get upgrade -y

sudo apt-get install createrepo rsync avahi-daemon -y

sudo hostname yum.local

# This assumes the mirror data is stored at /mnt/yum/

#mkdir -p /mnt/yum/www/html/repos/centos/7/os/x86_64
#mkdir -p /mnt/yum/www/html/repos/centos/7/updates/x86_64/
mkdir -p /mnt/yum/www/html/repos/epel/7/x86_64

#createrepo /mnt/yum/www/html/repos/centos/7/os/x86_64/
#createrepo /mnt/yum/www/html/repos/centos/7/updates/x86_64/
createrepo /mnt/yum/www/html/repos/epel/7/x86_64/

rsync -avz --exclude='repo*' \
    --exclude='testing' \
    --exclude='debug' \
    rsync://mirrors.rit.edu/epel/7/x86_64/ /mnt/yum/www/html/repos/epel/7/x86_64/  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment