
Chapter 11. Servicing Linux with Red Hat Network 157
Next, create the file /etc/auto.controller and add the following line, substituting the IP
address of your controller:
# vi /etc/auto.controller
rhel5.2 -ro,hard,intr <9.12.5.30>:/nfs/rhel5.2
Create the /nfs directory. Restart the autofs service to pick up the configuration changes,
then list the contents of the automounted directory:
# mkdir /nfs
# service autofs restart
Stopping automount: [ OK ]
Starting automount: [ OK ]
# ls /nfs/rhel5.2
EULA README-or.html RELEASE-NOTES-ja.html
eula.en_US README-pa.html RELEASE-NOTES-ko.html
...
Now that the installation tree is accessible, you will configure yum to use it. Create a file
named rhel5.repo in the /etc/yum.repos.d/ directory:
# vi /etc/yum.repos.d/rhel5.2.repo
[RHEL5.2]
name=Red Hat Enterprise Linux 5.2
baseurl=file:///nfs/rhel5.2/Server
Finally, you need to import the RPM GPG key so that yum knows you are installing official Red
Hat packages. The Red Hat GPG key is located in the install tree. Import the key with:
# rpm --import /nfs/rhel5/RPM-GPG-KEY
You are now ready to use yum to install or upgrade an RPM package. Refer to 11.2, “Installing
and updating packages using yum” on page 154 for an explanation of yum syntax.
11.4.3 Updating packages on the server
The RPMs are located in the /Server subdirectory of the install tree. Beneath this directory,
there is a subdirectory named /repodata which contains repository files used by yum.
Whenever a new set of RPMs is added to the /Server directory, you must rebuild the
repository data with the createrepo command.
On the controller, first install the createrepo RPM with:
# yum install createrepo
...
Running Transaction
Installing: createrepo ######################### [1/1]
Installed: createrepo.noarch 0:0.4.4-2.fc6
Complete!
Note: Red Hat signs each RPM with a private GPG key, which is compared to your public
key each time a package is installed. This method ensures that the RPM is a genuine,
unaltered package. When installing an RPM, if you ever see a message similar to the
following, it means that either the correct GPG key has not been imported, or the package
itself has been altered by a third party:
Header V3 DSA signature: NOKEY, key ID 897da07a
Komentarze do niniejszej Instrukcji