Linux-Noob Forums

Full Version: create your own apt repository!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

My job only has a T1 line and we have around 100 RH servers that need to stay updated. If there are upgrades to apply it will quickly saturate the line for a period of time and I could space out all of the upgrade times but that is no fun. So what do I do? I create my own apt mirror from an offical RH mirror site.

 

I use rsync. Here is the contents of my script.

 



Code:
#!/bin/sh


# Doing the RH 9.0 updates
cd /mirror/apt/9.0/RPMS.updates/
rsync -az --delete  --exclude=*src.rpm rsync://mirror.phy.bnl.gov/RedHat-updates/9/en/os/\*/ ./
genbasedir --bloat --bz2only /mirror/apt/9.0 updates




 

that will create an apt updates directory. I also have a RPMS.os dir there all the rpms that come on the 3 cd's are placed.

 

As you can see that script will grab all the rpms but not grab any src.rpm files. Doing things this way only grabs a file once per upgrade. If i did normal upgrades it would need to do that 100 times