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

Re: [K12OSN] Re: up2date problem SOLVED

dalen wrote:

The script I use is below. As you can see, the script is in cron.daily so it is executed once a day. The script runs rsync twice to sync base and updates. I exclude some things with the --exclude option.
I created /home/mirror/yum-repository/fedora/base and /home/mirror/yum-repository/fedora/updates to store the files and then made a symbolic link called mirror in /var/www/html/ so apache would see it. Then I added http://myserver/mirror/yum-repository/base and http://myserver/mirror/yum-repository/updates to yum.conf on the clients and commented out the old entries.
You can adjust the mirror name/path and local path as needed. Hope this is useful.



[root viewlib root]# cat /etc/cron.daily/rsync-yum-repository
/usr/bin/rsync --verbose --progress --stats --archive --partial --exclude SRPMS/ --exclude dosutils/ --exclude images/ --exclude isolinux/ mirrors.kernel.org::fedora/core/1/i386/os/ /home/mirror/yum-repository/fedora/base/

/usr/bin/rsync --verbose --progress --stats --archive --delete --exclude debug/ --exclude SRPMS/ --partial mirrors.kernel.org::fedora/core/updates/1/i386/ /home/mirror/yum-repository/fedora/updates/
[root viewlib root]#

note that the script has two long lines where everything is space separated (mozilla mail wraps the 2 lines into 4 lines).


Thank you very much for sharing your script, it will save me a lot of time looking up appropriate rsync options.

One more question for anyone
If I wanted to add my own packages, is the best way to do it to set up another directory holding our 'local' package repository, and add another entry to yum.conf to the clients I want to access it?

Thanks to the great link Ken Barber posted at
I can figure out how to "yummify" the result. And thanks the author, Robert G. Brown for documenting yum's usage so well.


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