Additions:
Additions:
# base rpms can be copied from CD/DVD instead
1 7 * * * rsync -avrt rsync://centos.mirrors.firstnetcom.com/centos/4/os/i386 --exclude=debug/ /var/www/html/centos/4/os/
1 9 * * * rsync -avrt rsync://centos.mirrors.firstnetcom.com/centos/4/os/x86_64 --exclude=debug/ /var/www/html/centos/4/os/
Deletions:
# optional # Copy the RPMs from the CDs/DVD to /var/www/html/centos/base.
How to make your own repo?
mkdir -pv /var/www/html/centos/4/{os,updates}/{i386,x86_64}
# optional # Copy the RPMs from the CDs/DVD to /var/www/html/centos/base.
yum install createrepo
createrepo /var/www/html/centos/4/os/i386/
createrepo /var/www/html/centos/4/os/x86_64/
Rsync your repo with
CentOS mirrors, probably in crontab -
http://www.centos.org/modules/tinycontent/index.php?id=13∞
1 1 * * * rsync -avrt rsync://centos.mirrors.firstnetcom.com/centos/4/updates/i386 --exclude=debug/ /var/www/html/centos/4/updates/
1 5 * * * rsync -avrt rsync://centos.mirrors.firstnetcom.com/centos/4/updates/x86_64 --exclude=debug/ /var/www/html/centos/4/updates/
On the target server, edit /etc/yum.repo.d/
CentOS-Base.repo
baseurl=http://www.domain.tld/centos/$releasever/updates/$basearch/
##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates