[Yum] Multiple machines & timeliness of updates.
perrin at ohio.edu
Fri Dec 5 17:54:39 UTC 2003
I've got a decent script that I've been using for this. feel free to modify
it to suit your needs.
I have this set to run as a crontab every day to keep up.
### variables for the update script ###
### Do we have a way to get the files?
if [ ! -x $rsync ]; then
echo "Unable to locate rsync. Make sure it is installed and in your
### Do we have a way to make the headers?
if [ ! -x $yumbuild ]; then
echo "Unable to locate yum-arch. Make sure it's in your path";
## Look for a lockfile so we don't start running the update twice
if [ -f $lockfile ]; then
echo "This update script is already running or stalled."
rm -rf $dest/headers
$rsync -azvH $src $dest
### Build the RPM headers for yum
if [ $? -ne 0 ]; then
rm -f $lockfile
echo "Rebuilding of header files failed." > $HOME/yum.rebuild ;
echo `/bin/date` > $dest/last-update.txt
rm -f $lockfile
--On Friday, December 05, 2003 11:42 AM -0500 "Hedemark, Magnus"
<mhedemark at trueposition.com> wrote:
> Kerry Cox [mailto:kerry.cox at ksl.com] asks:
>> Setting up a yum repository or something similar is something I have
>> been meaning to do a long time. Are there any good texts out
>> there that
>> explain how?
> It's cake.
> 1) Identify a Linux box to act as your repository server.
> 2) Install ftp or http server software to grant clients access to your
> 3) Install the yum suite on the server.
> 4) Mirror the RPM's that you want to host. For example:
> rsync -aqH --delete mirror.physics.ncsu.edu::redhat/linux/9/en/os/
> 5) "yum-arch /local/path/to/redhat/9/base/"
> 6) Share this path through ftp or http. Set up your yum clients to point
> to this path.
> Yum mailing list
> Yum at lists.dulug.duke.edu
More information about the Yum