[Centos] How to make a mirror of CentOS sites? (SOLVED)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi again, I found this file from WhiteBox mailling list :

#!/bin/bash
#MIrrors the main repo

DATE=`/bin/date +%Y-%m-%d`
MIRROR=/var/www/html/centos
OUTFILE=/var/log/centos/mirror-output-$DATE.log

cd /var/www/html/centos/headers
lftp -e 'o http://mirror.centos.org/centos-4/4.0/updates/i386/headers && mirror
--delete --only-newer --verbose && quit' >$OUTFILE

cd /var/www/html/centos/RPMS
lftp -e 'o http://mirror.centos.org/centos-4/4.0/updates/i386/RPMS && mirror
--delete --only-newer --verbose && quit' >>$OUTFILE

cd /var/www/html/centos/repodata
lftp -e 'o http://mirror.centos.org/centos-4/4.0/updates/i386/repodata && mirror
--delete --only-newer --verbose && quit' >>$OUTFILE

Now from the others CentOS servers: --> yum.conf pointing to my new repository!!

[root@razor ~]# yum update
Setting up Update Process
Setting up Repos
update                    100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================|  16 kB    00:00
MD Read   : ################################################## 34/34
update    : ################################################## 34/34
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for centos-yumconf to pack into transaction set.
centos-yumconf-4-4.1.noar 100% |=========================| 2.1 kB    00:00
---> Package centos-yumconf.noarch 0:4-4.1 set to be updated
---> Downloading header for tetex-dvips to pack into transaction set.
.......................

Thanks for your anwers...


regards

Israel


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux