Getting Linux Software up2date


Getting Linux Software “up2date”

The up2date facility is the preferred method from Red Hat, Inc. for updating Fedora and Red Hat Enterprise Linux software. Using up2date, you can determine if any software packages in your Linux distribution have updates available, and you can ask to have them downloaded and installed automatically.

Fixes and improvements continue after a distribution, such as Fedora Core or Red Hat Enterprise Linux, is released. You can incorporate those fixes and features into your system, using a connection to the Internet and up2date.

This section tells you how to determine which updates are available to your Fedora system. Then it describes how you can register to use the up2date tool to gather those updates.

With the advent of Fedora Core, the up2date facility has been modified to allow you to not only download software from Red Hat FTP sites, but also from repositories of software built to work with the apt and yum facilities.

Cross Reference: 

For detailed descriptions of apt and yum, refer to Chapter 5.

Getting updates from Fedora repositories

Fedora includes software that automatically notifies you of available updates and lets you easily download and install them on your Fedora system. The service is called up2date.

The up2date utility provides a mechanism that can:

  • Alert you to the latest fixes and enhancements available for Fedora.

  • Install the packages that include those changes to your system.

Using the Red Hat Network alert notification tool

To start the process of getting notifications of updates, you don’t have to go further than your desktop. A round icon with an exclamation point in the middle appears on the desktop panel, ready to help you check for critical updates to Fedora.

Note 

If the Red Hat Network Alert icon is not on your desktop, you can put it there by selecting the red hat menu on your desktop panel, then clicking System Tools ® Red Hat Network Alert Icon.

Figure 10-8 shows you what the Red Hat Network Alert icon looks like when updates are available. (If no updates are available, a blue checkmark icon appears instead.)

image from book
Figure 10-8: The Red Hat Network alert notification tool appears as a round icon on your desktop panel.

Right-click the icon and select Configuration from the context menu. The Red Hat Network Alert Notification Tool window appears. Follow these steps to begin the process of getting updates:

  1. From the Red Hat Network Alert Notification Tool window, click Forward. The Terms of Service window appears.

  2. Read the Terms of Service. Then either click Forward (to continue) or click Remove From Panel (to remove the icon and not use the service). If you continue, the Proxy Configuration window appears.

  3. If you need to go through a proxy server to get to the Internet for HTTP (Web) service, click Enable HTTP Proxy, identify the location of the proxy server, and then add any authentication information you need to connect to that server. Click Forward to continue.

  4. On the Configuration Complete window that appears, click Apply. At this point, the red icon turns blue and changes from an exclamation point to a check mark.

  5. Because Fedora Core is not an official Red Hat product, you do not need to register with Red Hat Network to get updates. For Red Hat Enterprise Linux, however, you can register with Red Hat Network to check for software updates, as described in the next section.

Registering with Red Hat Network

To register a Red Hat Enterprise Linux system with Red Hat Network, you can click the RHN icon, use the rhn_register command or simply look for the Red Hat Network Configuration window to pop up when you run up2date. Using any of these methods requires a connection to the Internet and root access to your computer — the latter because the registration process needs to access your computer’s RPM database. Though only the first computer you register can receive free automatic updates, you can register as many computers as you want with this tool. Here's how it works:

  1. From a Terminal window type rhn_register. The first time you run this, the Red Hat Network Configuration window appears.

  2. Select each of the following tabs to fill out basic configuration information:

    • General — Select an RHN server to get your updates. One should already be entered. If you need to go through an http proxy or provide a user name and password to reach the server, enter that information on this tab as well.

    • Retrieval /Installation — Set preferences here related to whether or not packages are immediately installed after they are downloaded and whether or not they are kept on your hard disk or deleted after installation. By default, packages are installed after retrieval, verified using GPG, and the RPMs are removed after they are installed. Packages that have had modifications to configuration files are not upgraded.

    • Package Exceptions — By default, any kernel packages are not upgraded. You can add other packages, or even selected files, to skip.

  3. If you do not have the Red Hat, Inc. public key on your keyring (and you selected to use GPG as is set by default), you are prompted to install the key. Click Yes to install the key. The Welcome to Red Hat Update Agent window appears.

  4. Click Forward. The Review the Red Hat Privacy Statement window appears.

  5. Read the explanation of the registration procedure and click Next. The Red Hat Privacy Statement appears. This statement tells you, among other things, how your personal information is used and how Red Hat uses cookies to track activities.

  6. Read the privacy statement. If it is acceptable, click Forward. The Login window appears.

  7. Add information to create a user account and click Forward. The information you provide includes:

    • User name — Type a name of your choosing.

    • Password — Type a password (then type it again in the next box to verify it).

    • E-mail address — Type the address at which you would like Red Hat to contact you.

    The Register a User Account window appears.

    Add the information and click Forward. The next screen asks for some personal information, including name, address, phone number, fax number, and how you would like to be contacted (e-mail, regular mail, phone, fax, or e-newsletter).

  8. A Register a System Profile-Hardware window appears. This window displays information about your Red Hat Linux version, host name, IP address, CPU mode, CPU speed, and memory.

  9. Select a profile name (the host name is used by default) or service ID number (which can be the computer’s serial number) and click Forward.

    The registration process begins building a list of packages installed on your computer. These are gathered so they can become part of your system profile. These packages are then displayed in the Register a System Profile-Packages window.

  10. Check that the packages that appear in the window are all okay to include in your system profile (unselecting the ones you don’t want to include) and click Next. The Send Profile Information to Red Hat Network window appears.

  11. Click Forward to register the system-profile information with the Red Hat Network. (Or choose not to send the information by clicking Cancel.) Your information is sent and the Registration Finished window appears.

  12. Click Forward to end the session.

After you have finished registering with Red Hat Network you can go to the RNH site and log in to use the service. You are now also ready to run the up2date command to update your software packages.

Getting updates with up2date

Whether you have registered your computer with Red Hat Network or not, you can use the up2date command (or right-click the notification icon and click Launch up2date) to find and install updates. As with rhn_register, you need root access to your computer to run up2date. This is because up2date needs permission to change configuration files and install packages.

The up2date configuration file (/etc/sysconfig/rhn/up2date) determines the behavior of up2date. Here are a few of the key settings in the up2date configuration file to help you understand what up2date will do when you launch it:

  • Debugging is disabled by default. Change debug=0 to debug=1 to turn on debugging if you are having trouble with up2date.

  • Downloaded packages are stored in the /var/spool/up2date directory. After they are installed, the packages are deleted (by default).

  • The up2date log file is /var/log/up2date. You can open the file in any text editor to see descriptions of everything up2date did.

  • Any packages that begin with the word kernel are skipped. Add other package names you want skipped to the pkgSkipList=kernel* entry. You can use shell wildcard characters, such as the asterisk shown in the example, to match all kernel packages.

The up2date configuration file contains other settings that you can use to further refine your up2date session. For example, you can identify an HTTP proxy server, change the number of failed network-connection attempts that must occur before an exit, or indicate that you want to retrieve source packages along with the binary packages.

The up2date sources file (/etc/sysconfig/rhn/sources) is another configuration file you might consider making enhancements to. In particular, if you want to get updates of packages already installed on your system from yum or apt repositories, you can add the locations of those repositories to this file. The following two lines contain examples of entries you could add to the sources file for yum and apt repositories, respectively:

yum fedora-core-i386-stable http://download.fedora.us/fedora/fedora/3/i386  apt freshrpms-9-i386 http://ayo.freshrpms.net/fedora/linux/3/i386 updates freshrpms 

The yum example shows the service as yum and the channel name is fedora-core-i386-stable, followed by the location of the yum repository. In the apt example, the repository is divided into three parts: the host name, path, and final directory. Notice that in this example, both updates and freshrpms directories are available repositories. Once you have added a line similar to the ones just shown, they appear as channels in the Channel window when you run up2date.

To use the official locations for packages from Red Hat Inc., you can simply use the default up2date settings. Here’s an example of an up2date session:

  1. Type up2date or click the notification icon and select Launch up2date. If your system does not yet have the Red Hat public key, you will be asked if you want to have up2date install it. (The key is needed to verify that the packages you are receiving are signed by Red Hat.)

  2. Click Yes to install the key. The Red Hat Update Agent window appears.

  3. Click Forward. The Channels window appears.

  4. The Channel indicates the version of Red Hat Linux you are running. Select the Channel appropriate to your Red Hat installation and click Forward. The Update Agent begins checking your available packages.

  5. The Available Package Updates window appears, displaying packages available for updates. Click each package you want to update or click Select All Packages to have all applicable packages updated. You can click on a package and then click View Advisory to see which advisories are addressed by updates for the package.

  6. Click Forward to continue. The Update Agent begins testing packages to check for dependencies among the packages you are updating. If any dependencies arise from the packages you selected, the Packages Required to Solve Dependencies window appears, listing the additional packages you need.

  7. Click Forward to have the packages shown included in the updates (or click the back button to change your package list). The Retrieving Packages window appears and notes the progress as the packages are downloaded from the Red Hat Network.

  8. Click Forward to begin downloading the packages to your computer. (This may take a while, depending on the speed of your Internet connection and the number of packages you are downloading.)

  9. When all packages are downloaded, click Forward. The Installing Packages window appears.

  10. Click Forward to begin installing the packages you have downloaded.

  11. When all the packages are installed, click Next. The All Finished window appears, displaying the package name and version for each package that was installed.

  12. Click Finish to end the session.

If you are interested in seeing how the upgrades went, you can do the following:

  • Check the log file (/var/log/up2date).

  • See if any packages were left behind in the spool directory (/var/spool/up2date).

Though you don’t necessarily have to reboot Linux at this point, if new daemon processes are installed with any of the updated packages you might want to restart them. For example, to restart your Web server (httpd daemon), you could type the following as root user:

 # /etc/init.d/httpd restart 

Getting Updates with yum

You can bypass the whole up2date facility and use yum to get package updates for Fedora. Configure yum as described in Chapter 5. Then, to check for available updates (assuming you are connected to the Internet), type the following:

 # yum list updates 

The previous command will show what package updates are available to your current system. If there are no error conditions, type the following:

 # yum update 

At this point, yum will begin updating all your Fedora RPM packages to the latest versions.

Using the Red Hat Network

If you decide to create an account with Red Hat Network you can log in to the RHN site and take advantage of the services it offers. Services that you receive simply by registering with the Red Hat Network Web site include:

  • The ability to view complete listings of available errata, including security, bug fixes, and enhancement alerts. Errata are organized by Red Hat Linux version, to take the guesswork out of figuring out compatibility issues.

  • E-mail alerts of errata and notification of new packages available to fix the problem.

  • An entitlement manager that shows you which systems you are entitled to manage through RHN and lets you add more systems.

  • A feature for scheduling actions, such as automatic package update at a specified time.

Go to the Red Hat Network site (rhn.redhat.com) and log in using the user name and account you created during the rhn_register session described earlier. Traverse the RHN site using links on this page. Available sections include:

  • Your RHN — Contains notifications of the systems that may contain outdated packages. Sections in Your RNN include: Your Account (which contains personal information, such as name, address, e-mail, and so on) and Your Preferences (where you can specify whether or not you want to receive e-mail errata).

  • Systems — Lets you view a System List, which contains all the systems you have registered with RHN, or use a search tool to search your list of systems.

  • Errata — From the Errata page you can display all errata, show only those that apply to your system, or do keyword searches of available errata.

  • Channels — A channel designates a version of Red Hat Enterprise Linux that has package updates associated with it. By selecting the Channel List in this section, you can see what package versions are available for the Red Hat Enterprise Linux version you are using.

  • Schedule — You can schedule package installations to occur at a later time. From this page you can also see pending, completed, and archived actions.

  • Help — For more help with Red Hat Network, the Help Desk offers the RHN FAQ, a customer-service support link, support forums, and the RHN Reference Guide.




Red Hat Fedora Linux 3 Bible
Red Hat Fedora Linux 3 Bible
ISBN: 0764578723
EAN: 2147483647
Year: 2005
Pages: 286

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