4.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:
Option | Description |
---|---|
-? , --usage | Briefly describe the available options. |
-h , --help | List 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. |
--configure | Configure Red Hat Update Agent options. Refer to Section 4.4, “Configuration” for detailed instructions. |
-d , --download | Download 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=dir | Specify an alternate RPM database to use temporarily. |
--dry-run | Do everything but download and install packages. This is useful in checking dependencies and other requirements prior to actual installation. |
-f , --force | Force package installation. This option temporarily overrides the file, package, and configuration skip lists. |
--firstboot | Pop up in the center of the screen for Firstboot. |
--get | Fetch the package specified without resolving dependencies. |
--get-source | Fetch the source package specified without resolving dependencies. |
--gpg-flags | Show the flags with which GPG is invoked, such as the keyring. |
--hardware | Update this system's hardware profile on RHN. |
-i , --install | Install 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 |
--justdb | Only add packages to the database and do not install them. |
-k , --packagedir | Specify a colon-separated path of directories in which to look for packages before trying to download them. |
-l , --list | List packages relevant to the system. |
--list-rollbacks | Show the package rollbacks available. |
--nodownload | Do not download packages at all. This is useful in testing. |
--nosig | Do not use GPG to check package signatures. This option temporarily overrides the saved configuration option. |
--nosrc | Do not download source packages (SRPMs). |
--nox | Do not attempt to run in X. This launches the command line version of the Red Hat Update Agent. |
-p , --packages | Update 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. |
--register | Register (or re-register) this system with RHN. Refer to Section 4.2, “Registration” for detailed instructions. |
--serverUrl=server URL | Specify an alternate server from which to retrieve packages. |
--showall | List all packages available for download. |
--show-available | List all packages available that are not currently installed. |
--show-channels | Show the channel name associated with each package. |
--show-orphans | List all packages currently installed that are not in channels to which the system is subscribed. |
--show-package-dialog | Show the package installation dialog in GUI mode. |
--solvedeps=dependencies | Find, download, and install the packages necessary to resolve dependencies. |
--src | Download 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 , --update | Update system with all relevant packages. |
--undo | Reverse 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 , --verbose | Show additional output while updating. |
--version | Show up2date version information. |
--whatprovides=dependencies | Show the packages that resolve the comma-separated list of dependencies. |
Note
The
--solvedeps
and --whatprovides
options can be used to solve the dependencies for an RPM regardless even if your system does not currently have access to a channel that contains that package.
4.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.
Note
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.
4.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 4.3.3, “Synchronizing Your System Profile” for details.
4.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 Red Hat Enterprise Linux 5.3 system and on Red Hat Network, run the command:
rhn-profile-sync
After running this command, your RHN System Profile reflects the latest software versions installed on your system.
For Red Hat Enterprise Linux 4 systems, use the following command to update the package list, run the command:
up2date -p
4.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.