This section describes some sample configurations. For a list of all available options please refer to the man page or use autoupd --help to get a list of all command line options.
Next you will need to set up a dld configuration file for every site you want to check for updates. As a start you can just install one of the sample *.dld configuration files (or use one of the samples as a template).
For example the default dld configuration for redhat updates looks like
# /etc/autoupdate.d/redhat.dld # Download configuration file for redhat updates # *** Please choose a mirror close to you! *** Host=ftp.redhat.com # Protocol (defaults to ftp) Protocol=ftp #User= #Pass= # If you want to override the default from the config file #Passive=1 # Should we retry if our first login attempt fails? Useful for busy # mirrors. FTPRetry=2 # How long should we wait between two connection attempts? FTPWait=10 # In general, only updated rpms will be downloaded. However, if DldUnknown # is set to 1, new rpms which are not in the provides data base are downloaded # so that their dependency information can be added to the provides data # base. This is needed for the dependency resolution and should be set to # 1 at least for your distribution updates. If set to 2, all new rpms will # be downloaded. DldUnknown=1 # If you also want rpms you don't have installed downloaded, the set # this to 1 #DldNew= 0 # Descend directories recursively at the remote site? DldRecursive=0 # Any number of directories can be given here (one "Dir=..." per line). # The two trailing slashes at the end will make autoupdate search in # subdirectories according to architecture (alternatively, you can omit # the trailing slashes and use DldRecursive=1, however, the syntax below # will not search directories corresponding to archs you do not need and # is hence faster) Dir=/pub/redhat/linux/updates/#DistVersion#/#DistLang#/os//
Again, there is nothing to change except that you might want to replace ftp.redhat.com with a mirror close to you.
Now just type autodld. This will download all new updates from ftp.redhat.com and upgrade your system. Moreover, linking autodld to /etc/cron.daily will check for updates every day and you (root) will get a list of all rpms which have been upgraded via email. In this case you might also want to set Verbose=0 (in autoupdate.conf) such that it only produces output if new rpms are found (or put a script into /etc/cron.daily which invokes it as autoupdate --noverbose).
Of course you can create additional *.dld configuration files for additional sites you want to check. For example here is one which will get you the latest Webmin package:
# /etc/autoupdate.d/webmin.dld # Download configuration file for webmin updates Host=heanet.dl.sourceforge.net Protocol=http # older versions use some non-standard rpm names RPMNameWarnings=0 # plus some strange version numbers Exclude=^webmin-0.8 Dir=/sourceforge/webadmin/
If you want to use the get mode (i.e., use AutoUpdate to install new rpms plus dependencies) as well, you need to set up get configuration files for each site you want to search for those new rpms. So if you want to be able to add additional rpms from the redhat distribution you could use:
Adding also a get file freshrpms.get for freshrpms.net you can use AutoUpdate to install some of the nice multimedia applications which are missing in RedHat due to patent issues (See also the Quick Start Guide). Further sample *.dld and *.get configuration files can be found here. Note: If you have sufficient drive space you can configure an RPMDir and copy all rpms from your distribution to this directory. These rpms will then be used during get mode as well as for resolving dependencies. In particular, if you use autoins instead of rpm -i to install rpms, it will add rpms from the RPMDir automatically whenever they are required by one of the new rpms! (Of course you can add additional (nonredhat) rpms to the RPMDir or remove some which you know you will never need.)# /etc/autoupdate.d/redhat.get # Get configuration file for redhat rpms. This file will only be used # during get mode. # *** Please choose a mirror close to you! *** Host=ftp.redhat.com # Descend directories recursively at the remote site? DldRecursive=0 # Any number of directories can be given here (one "Dir=..." per line). # The BaseDir will be added to all Dir's which do not start with # a "/". BaseDir=/pub/redhat/linux/#DistVersion#/#DistLang# Dir=os/#DistArch#/RedHat/RPMS #Dir=powertools/#DistArch#/RedHat/RPMS # Check the updates as well to make sure we get the latest version Dir=/pub/redhat/linux/updates/#DistVersion#/#DistLang#/os//
In the simplest case you have one server which is more or less identiacal to the clients (in particular, server and clients have the same version of your distribution installed). In this case you should make the following changes in autoupdate.conf:
Moreover, if you have sufficient drive space you might set up an RPMDir which contains all rpms your boxes have installed and use these rpms for comparison instead of the installed ones. This will be done automatically. If you want AutoUpdate to use only the rpms in RPMDir, you can set DldAddInstalled=0.
Finally, all you have to do is to export the UpdateDir via one of the methods supported by AutoUpdate (ftp,sftp,http,https) and let the clients check it. The best solution is probably to export this directory via nfs and let the clients use it directly. This way the clients can use the provides database of the server and they have full access to the rpm headers (e.g., they will use the epoch and obsoletes tags). Otherwise you might also set up an repository.
The problem now is, that the server does not know what version of each rpm the different clients have installed and, in particular, it cannot use the rpm it has installed for comparison. Hence you have to use
Here is my setup. I have (customized) RedHat, Fedora distributions on my server in /usr/src/redhat-{7.3,9}, /usr/src/fedora-1 and I keep the updates in /usr/src/redhat-{7.3,9}/updates, /usr/src/fedora-1/updates. In addition to the the above I use
From /etc/cron.daily I run
on the server and#!/bin/sh # This gets the updates for the RedHat 7.3 clients autodld --noverbose --noupdate --distversion 7.3 # This gets the updates for the Fedora 1 clients autodld --noverbose --noupdate --distname Fedora --distversion 1 # This gets the updates for the 9 clients and at the same time upgrades the server autodld --noverbose
on the clients, where /auto.mnt/redhat is the /usr/src/redhat-{8.0,9} directory (auto)mounted via nfs from the server. New rpms can be installed on all clients by copying them to the newrpms directory.#!/bin/sh # Sleep some random time between 0 and 2 hours sleep $((RANDOM % 7200)) export HOME=/root RHDIR=/auto.mnt/redhat # Upgrade rpms autoupd --noverbose --kernel --updatedir $RHDIR/updates --rpmdir $RHDIR/RedHat/RPMS # Install new rpms autoins --noverbose --updatedir $RHDIR/newrpms --rpmdir $RHDIR/RedHat/RPMS
Finally, you can use the --merge option to replace all rpms in your distribution with the updated ones. This is particularly usefull if you use the rpm directory for nfs installs or want to burn your own cds (you need to run genhdlist for the RedHat installer to work with the updated rpms). Similarly, --purge will remove old versions from the updates directory.
Setting the optionautoupd --autoinfo
Now instead of letting the clients parse the directory, you can just point them to this autoinfo file.
Note:# /etc/autoupdate.d/myserver.dld # Download configuration file for redhat updates Host=ftp.mydomain.com # Protocol (defaults to ftp) Protocol=ftp #RPMBaseDir=/path/to/rpms AutoInfo=/path/to/autoinfo.bz2