Created
July 13, 2015 10:45
-
-
Save tuxfight3r/20ce0166b6bbc330e1bb to your computer and use it in GitHub Desktop.
Centos updates via rsync behind proxy
This file contains 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
#!/bin/bash | |
Purpose: Sync centos7 repos via rsync behind proxy | |
Author: Mohan | |
#Makesure rsync port 873 is allowed outbound on the squid proxy | |
export RSYNC_PROXY=192.168.2.250:3128 | |
#create directory structure | |
mkdir -p /opt/repo/yum/centos/{os,updates} | |
#Update Base Repo | |
#cd /opt/repo/yum/centos/os | |
rsync -avzr --progress rsync://mirror.nl.leaseweb.net/centos/7.1.1503/os/ . | |
#Update Updates Repo | |
#cd /opt/repo/yum/centos/updates | |
rsync -avzr --progress rsync://mirror.nl.leaseweb.net/centos/7.1.1503/updates/ . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment