One key advantage of RHEL is access to the Red Hat Network (RHN). With the RHN, you can keep all of your registered systems up to date from one Web-based interface. You can even configure RHN to run commands remotely, on a schedule. Naturally, this can be a terrific convenience for remote administrators. But before any of this is possible, you'll need to register your system on the RHN.
If you're running a "rebuild" distribution such as CentOS-5, you don't need access to the RHN. If this applies to you, feel free to skim until reaching the "Updating with Pup" section.
As the RHN requires subscriptions, Red Hat does not have any public mirrors for RHEL updates. If you have a group of RHEL systems, it's possible to download the updates once and store them locally. You can then use those RPMs to update the other RHEL systems on your network. Red Hat facilitates this kind of communication with the RHN Proxy Server and Satellite Server products.
While the Red Hat Network is covered per the public syllabus for the prep courses for both the RHCT and RHCE, it is not included in the Red Hat Exam Prep guide. And I don't think you'll have Internet access during the Red Hat exams.
While you can configure your own local proxy of updates, it won't come with Red Hat support. I've written a guide to this process, Linux Patch Management, published by Prentice-Hall.
Before you can administer your system on the RHN, you have to register. You'll need either a registration code associated with your subscription or available entitlements for your RHN account.
You may have already registered during the First Boot process described in Chapter 2. But if you've installed the system in text-mode, or using kickstart (common on many servers), you may not have gone through the First Boot process, at least the version that supports registration. Naturally, you can still register after installation. This section covers text-mode registration, which is how most administrators work with servers. If you want to register your system from the GNOME Desktop Environment, you're prompted to do so during the first update. Choose Applications | System Tools | Package Updater, and follow the wizard. If you don't see the wizard, your system is already registered (or you're using a rebuild distribution).
To register from the command line, take the following steps:
Run rhn_register from the command line.
You'll see a Setting Up Software Updates window. If you need more information about the RHN, select Why Should I Connect To RHN; otherwise, select Next to continue.
You'll see a screen where you can enter your login information for the RHN. If you don't have an RHN account, select Create A New Login, and follow the instructions there before moving on to step 4. Otherwise, enter your RHN account information and select Next.
Now you can choose whether to register a system profile. First, you can choose whether to send basic hardware information about your system; make a decision and select Next to continue.
Next, you can choose to include a list of installed packages, which helps the RHN check whether you need software and security updates. Make any desired changes and select Next to continue.
Finally, you can choose whether to send your system profile to the RHN. If you click Cancel, the tool stops, and your system is not registered. I assume you want to register; if so, select Next to continue.
Your system attempts to contact the RHN server (or possibly your RHN Satellite Server). After additional prompts, you should see a message that you've successfully registered your system with the RHN.
Red Hat has adapted the Package Updater, also known as Pup, to manage updates for RHEL systems. If you're properly registered on the RHN, you can use Pup to list available updates and download them as needed. It runs only in the GUI. To start it, choose Applications | System Tools | Software Updater. As shown in Figure 5-1, it's a simple tool; it lists only those packages for which later versions are available, which you can deselect as desired before newer packages are downloaded and installed. If you select Update Details, you can review the version numbers of the packages being changed.
Figure 5-1: Pup, the Package Updater
|On the Job|| |
If you haven't already registered your system, starting Pup first starts the Red Hat Network Registration steps just described.
When you've made your selections, click Apply Updates.
Red Hat has incorporated dependency resolution into the update process. Through RHEL 4, this was done with up2date. Red Hat has now incorporated yum into RHEL 5. The yum command uses subscribed RHN channels and any other repositories that you may have configured in the /etc/yum.repos.d directory.
Before yum and up2date, dependencies were a serious annoyance. For example, if you hadn't installed the Samba RPM and tried to install the system-config-samba RPM, the installation would fail with a message like this:
error: Failed Dependencies: samba is needed by system-config-samba-1.2.39-1.el5.noarch
With yum, you can install the system-config-samba RPM, and the samba RPM is automatically installed together with it. In this case, all you need to run is
# yum install system-config-samba
And dependencies-in this case, the Samba RPM-are installed automatically.
You can use a single yum command to install as many packages as you want; just add each package name to the end of the command. The yum command is described in more detail later in this chapter.
There are a number of third-party repositories available for RHEL. They include several popular applications that are not supported by Red Hat. For example, I use one to install packages associated with my laptop wireless network card.
While the owners of these repositories work closely with some Red Hat developers, there are some reports where dependencies required from one repository are unavailable from other repositories, leading to a different form of what is known as "dependency hell." However, at least the more popular third-party repositories are excellent; I've never encountered "dependency hell" from using these repositories.
|On the Job|| |
There are two main reasons why Red Hat does not include most proven and popular packages available from third-party repositories. Some are not released under open-source licenses, and others are packages that Red Hat simply chooses not to support.
One of the benefits of the RHN is that it allows you to manage all your registered RHEL systems remotely, over a Web-based interface. You can manage and even run remote commands on all of your systems on any schedule you can configure. To ease administrative issues, you can group systems together and apply your changes to every system in a group.
Naturally, the RHN allows you to do a number of things remotely, including:
Edit and add custom configuration files.
Create kickstart installations.
It also allows you to configure different subscription channels for each of your systems, and much more. For more information on the RHN, see the latest version of the reference guide, available from https://rhn.redhat.com/rhn/help/reference/.