Section 7.5. Maintaining the Repository


7.5. Maintaining the Repository

Patch management means that you have to maintain updates for all the computers on your network. For the repositories that you've created, that means you need to keep them up to date. Generally, that means configuring updates as a cron job, not only for clients, but between your local repository and the mirror of your choice. You've seen samples of the cron jobs you can use for clients in Chapter 6. In this section, we'll see how you can maintain a local repository.

As repositories are kept up to date, sometimes headers can be corrupted. In that case, you can delete the headers, whether from the headers/ directory or from the compressed files in the repodata/ directory.

7.5.1. Updating Packages

Generally, you'll want to update repositories on a daily (or nightly) basis. After a repository is created, the required downloads go down significantly. In most cases, you'll be able to create your own script in the /etc/cron.daily directory, which is automatically run on a daily basis, as determined by the schedule as defined in /etc/crontab.

As you saw earlier, the following command can synchronize files on the noted local directory with a remote server at mirrors.kernel.org:

rsync -av --exclude debug \ rsync://mirrors.kernel.org/fedora/core/updates/3/i386/* \ /var/ftp/pub/yum/3/i386/updates/ 


I've created the repo file in my /etc/cron.daily directory and added the following commands:

#!/bin/sh rsync -av --exclude debug \ rsync://mirrors.kernel.org/fedora/core/updates/3/i386/* \ /var/ftp/pub/yum/3/i386/updates/ 


7.5.2. Cleaning Header Information

If there are problems with updates, check the applicable log file. It's available in the yum.log file in the /var/log directory. In many cases, it can help to regenerate headers. In other words, you would take the following steps:

1.

Delete the headers/ or repodata/ subdirectory in your repository.

2.

Navigate to the directory with the repository.

3.

Regenerate the headers with the command that applies to your distribution: yum-arch or createrepo.



Linux(r) Patch Management(c) Keeping Linux(r) Systems Up To Date
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2006
Pages: 80
Authors: Michael Jang

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net