2.3. Command Line Version

If you are not running X, you can still run the Red Hat Update Agent from a virtual console or remote terminal. If you are running X but want to use the command line version, you can force it not to display the graphical interface with the following command:

up2date --nox

The command line version of the Red Hat Update Agent allows you to perform advanced functions or to perform actions with little or no interaction. For example, the following command updates your system with no interaction. It downloads the newer packages and installs them if you configured it to do so.

up2date -u

The command line version of the Red Hat Update Agent accepts the following arguments:

OptionDescription
-?, --usageBriefly describe the available options.
-h, --helpList the available options and exit.
--arch=architecture Force up2date to install this architecture of the package. Not valid with --update, --list, or --dry-run.
--channel=channel Specify from which channels to update using channel labels.
--configureConfigure Red Hat Update Agent options. Refer to Section 2.4 Configuration for detailed instructions.
-d, --downloadDownload packages only; do not install them. This argument temporarily overrides the configuration option Do not install packages after retrieval. Use this option if you prefer to install the packages manually.
--dbpath=dirSpecify an alternate RPM database to use temporarily.
--dry-runDo everything but download and install packages. This is useful in checking dependencies and other requirements prior to actual installation.
-f, --forceForce package installation. This option temporarily overrides the file, package, and configuration skip lists.
--firstbootPop up in the center of the screen for Firstboot.
--getFetch the package specified without resolving dependencies.
--get-sourceFetch the source package specified without resolving dependencies.
--gpg-flagsShow the flags with which GPG is invoked, such as the keyring.
--hardwareUpdate this system's hardware profile on RHN.
-i, --installInstall packages after they are downloaded. This argument temporarily overrides the configuration option Do not install packages after retrieval.
--installall=<channel-label>Install all available packages from a given channel
--justdbOnly add packages to the database and do not install them.
-k, --packagedirSpecify a colon-separated path of directories in which to look for packages before trying to download them.
-l, --listList packages relevant to the system.
--list-rollbacksShow the package rollbacks available.
--nodownloadDo not download packages at all. This is useful in testing.
--nosigDo not use GPG to check package signatures. This option temporarily overrides the saved configuration option.
--nosrcDo not download source packages (SRPMs).
--noxDo not attempt to run in X. This launches the command line version of the Red Hat Update Agent.
-p, --packagesUpdate packages associated with this System Profile.
--proxy=proxy URL Specify an HTTP proxy to use.
--proxyPassword=proxy password Specify a password to use with an authenticated HTTP proxy.
--proxyUser=proxy user ID Specify a username to use with an authenticated HTTP proxy.
--registerRegister (or re-register) this system with RHN. Refer to Section 2.2 Registration for detailed instructions.
--serverUrl=server URLSpecify an alternate server from which to retrieve packages.
--showallList all packages available for download.
--show-availableList all packages available that are not currently installed.
--show-channelsShow the channel name associated with each package.
--show-orphansList all packages currently installed that are not in channels to which the system is subscribed.
--show-package-dialogShow the package installation dialog in GUI mode.
--solvedeps=dependencies Find, download, and install the packages necessary to resolve dependencies.
--srcDownload source packages, as well as binary RPMs.
--tmpdir=directory Temporarily override the configured package directory. The default location is /var/spool/up2date. This option is useful if you do not have enough space in the configured location.
-u, --updateUpdate system with all relevant packages.
--undoReverse the last package set update.
--upgrade-to-release=release version Upgrade to the channel specified.
--uuid=uuid Pass in a Unique User ID generated by the Alert Notification tool.
-v, --verboseShow additional output while updating.
--versionShow up2date version information.
--whatprovides=dependencies Show the packages that resolve the comma-separated list of dependencies.

Table 2-2. Update Agent Command Line Arguments

NoteNote
 

The --solvedeps and --whatprovides options can be used to solve the dependencies for an RPM even if your system does not currently have access to a channel that contains that package.

2.3.1. Installing the Red Hat GPG key

The first time you run the graphical version of the Red Hat Update Agent, it prompts you to install the Red Hat GPG key. This key is required to authenticate the packages downloaded from Red Hat Network. If you run the command line version the first time you start Red Hat Update Agent, you must install the Red Hat GPG key manually. If you do not have it installed, you will see the following message:

Your GPG keyring does not contain the Red Hat, Inc. public key.
Without it, you will be unable to verify that packages Update Agent downloads
are securely signed by Red Hat.

NoteNote
 

GPG keys must be installed for each user. To install the key to use with Red Hat Network, import the key while logged in as root.

The method for installing the key varies depending on your version of RPM. Starting with version 4.1, which shipped with Red Hat Enterprise Linux 3, you may use RPM to import GPG keys. Issue the following command at a shell prompt as root:

rpm --import /usr/share/doc/rpm-4.1/RPM-GPG-KEY

For older versions of RPM, such as the one that came with Red Hat Enterprise Linux 2.1, use the gpg command (as root):

    /usr/bin/gpg --import /usr/share/rhn/RPM-GPG-KEY

To download the Red Hat GPG key first, you may obtain it from https://www.redhat.com/security/team/key.html . Here's an example:

Type bits/keyID Date User ID
pub  1024D/650D5882 2001-11-21 Red Hat, Inc. (Security Response Team)
sub  2048g/7EAB9AFD 2001-11-21 

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)

mQGiBDv70vQRBADh701rf8WUzDG88kqlV/N5KQ1PF0amnODB/1EeuAD7n6bCBRmV
ekQWJCdfab0Rf1S+VsFg6IAAAmDIarVnacTLQzqCdGJqTpXm/rGVpLv+mCh+OmT9
QRFbjSzB0uPJOpiIvJwSS00D/wJ8XKzHkVNgW3DiJ9Qz2BHYszU2ISI6FwCgxY6d
IVjWT5jblkLNjtD3+fR024ED/i0e2knetTX3S9LjC+HdGvP8Eds92Ti2CnJLaFJk
Rp749PucnK9mzxPcO2jSHgdtjWAXst/st+gWFVbFmkjBQDVSd00B/xEwI1T1+LN8
V7R8BElBmg99IlJmDvA2BI/seXvafhzly9bxSHScFnceco/Az9umIs3NXwv3/yOm
ZakDBAC6SAGHBmpVkOdeXJDdb4LcbEhErFU3CpRCjZ6AOnFuiV1MGdulZXvEUgBA
I6/PDE5nBHfZY3zPjyLPZVtgYioJpZqcRIx/g+bX2O8kPqvJEuZ19tLCdykfZGpy
bsV7QdSGqBk3snNOizmFj543RaHyEbnwKWbNADhujWMeUAxN+7Q8UmVkIEhhdCwg
SW5jLiAoU2VjdXJpdHkgUmVzcG9uc2UgVGVhbSkgPHNlY2FsZXJ0QHJlZGhhdC5j
b20+iFcEExECABcFAj3GczYFCwcKAwQDFQMCAxYCAQIXgAAKCRBeVICDZQ1YghAU
AJoCeQfuMR2dKyLft/10O6qUs+MNLQCggJgdO8MUO2y11TWID3XOYgyQG+2InAQT
AQIABgUCPtyYpQAKCRDurUz9SaVj2e97A/0b2s7OhhAMljNwMQS4I2UWVGbgtxdu
D+yBcG/3mwL76MJVY7aX+NN/tT9yDGU+FSiQZZCL/4OFOHMvjpcDqfJY+zpTlBii
ZMAPJWTs2bB+0QaXxUgWlwW84GVf2rA6RSbvMLTbDjTH8t7J1RGP9zAqu8SgraTA
QbQdao6TNxVt+ohGBBMRAgAGBQI+3LjCAAoJECGRgM3bQqYOf5MAoIjiJDe+hDOj
9+jlR0qDs9lIi/C2AJ9SBBfd4A8hyR4z3lY7e0LzjWF51LkCDQQ7+9O3EAgA8tMs
xdUmuTfA+X78fMXh7LCvrL4Hi28CqvNM+Au81XJjDLNawZvpVmFlMmd9h0Xb5Jt2
BZWLR13rcDUByNdw1EWhVAzCz6Bp9Z3MIDhcP00iIBctIHn7YP9fi5vV0G03iryT
XE01mhWoBlC233wr3XHwsqxFfZzaCZqqNKTl0+PNfEAIzJRgtYiW8nzFTPpIR05E
oRn6EvmQfayOF2uYDX9Sk//lOD7T7RLtKjM/hPW/9NoCGwwROaG+VUzVv4aelh1L
dJGEjpFtdxcrOUMD8xbkuGMznu0mpDI+J2BUDh5n57yOyEMaGrQ0jfY1ZqdqDvZg
osY1ZHa6KlmuCWNTnwADBQf/XYhCicp6iLetnPv6lYtyRfFRpnK98w3br+fThywC
t81P2nKv8lio6OsRbksGc1gX8Zl6GoHQYfDe7hYsCHZPoWErobECFds5E9M7cmzV
TTyNTvrELrs07jyuPb4Q+mHcsYPILGR3M+rnXKGjloz+05kOPRJaBEBzP6B8SZKy
QNqEfTkTYU4Rbhkzz/UxUxZoRZ+tqVjNbPKFpRraiQrUDsZFbgksBCzkzd0YURvi
CegO2K7JPKbZJo6eJA10qiBQvAx2EUijZfxIKqZeLx40EKMaL7Wa2CM/xmkQmCgg
Hyu5bmLSMZ7cxFSWyXOst78dehCKv9WyPxHV3m4iANWFL4hGBBgRAgAGBQI7+9O3
AAoJEF5UgINlDViCKWcAoMCeYStWVKXJTytzHEL6Wl8rXr8WAKCHuapJIA4/eFsf
4ciWtjY8cO0v8Q==
=yOVZ
-----END PGP PUBLIC KEY BLOCK-----

Save the text file and import it into your keyring using the method applicable to your version of RPM.

2.3.2. Manual Package Installation

If you chose to download, but not install, the software updates with the Red Hat Update Agent or from the RHN website, you must install them manually using RPM.

To install them, change to the directory that contains the downloaded packages. The default directory is /var/spool/up2date. Type the command rpm -Uvh *.rpm. When the packages finish installing, you can delete them if you wish. You do not need them anymore.

After installing the packages, you must update your System Profile so that you are not prompted to download them again. Refer to Section 2.3.3 Synchronizing Your System Profile for details.

2.3.3. Synchronizing Your System Profile

If you configured the Red Hat Update Agent to install the latest packages, the System Profile stored by Red Hat Network is updated after the packages are installed. However, if you only download the latest RPM packages using the Red Hat Update Agent, download the RPM packages from the website, or upgrade/install/remove RPM packages yourself, your System Profile is not updated automatically. You must send your updated System Profile to the RHN Servers.

To synchronize the RPM package list on your local system and on Red Hat Network, run the command:

up2date -p

After running this command, your RHN System Profile reflects the latest software versions installed on your system.

2.3.4. Log File

The Red Hat Update Agent keeps a log of all the actions that it performs on your system in the file /var/log/up2date. It uses the standard rotating log method. Thus, older logs are in /var/log/up2date.1, /var/log/up2date.2, and /var/log/up2date.3. The log files store actions performed by the Red Hat Update Agent such as when your RPM database is opened, when it connects to Red Hat Network to retrieve information from your System Profile, which packages are downloaded, which packages are installed using the Red Hat Update Agent, and which packages are deleted from your system after installation. If you choose to install and delete packages yourself, it is not logged in this file. Red Hat Network recommends that you keep a log of actions not performed with the Red Hat Update Agent.