Show Table of Contents
4.3. Using RHUI Manager from the Shell Prompt
RHUI Manager is designed to be run using the interactive shell, however some functions can also be run from a standard shell prompt.
View all options and commands by using the
--help command:
$ rhui-manager --help
Usage: rhui-manager [options] [command]
OPTIONS
-h/--help show this help message and exit
--debug enables debug logging
--config absolute path to the configuration file; defaults to /etc/rhui/rhui.conf
--server location of the RHUA server (overrides the config file)
--username if specified, previously saved authentication credentials are ignored and this username is used to login
--password used in conjunction with --username
COMMANDS
cert : Red Hat content certificate management
packages : package manipulation on repositories
repo : repository listing and manipulation
status : RHUI status and health information
Note
Commands in this list that begin with a
-- can be used both in the interactive shell and at the shell prompt. All other commands can only be used at the shell prompt.
Flags
--debug- Enables more verbose logging. The log file can be found at
~/.rhui/rhui.log --config /path/examplefilename.conf- This command instructs RHUI Manager (both the interactive shell and the shell prompt) to use the specified configuration file, instead of the default file located at
/etc/rhui/rhui-tools.conf --server rhua.example.com- This command instructs RHUI Manager (both the interactive shell and the shell prompt) to connect to the specified server instead of the server specified in the configuration file. Authentication credentials are stored on a per server basis, so this flag can be used to allow a single RHUI Manager installation to manage multiple RHUI installations.
--username username --password password- This command instructs RHUI Manager to use the specified credentials to log into the Red Hat Update Appliance (RHUA). When using these commands, the authentication certificate will not be stored. This allows scripts to execute shell prompt commands on the RHUI without needing to manage authentication certificates as well.
Content Certificate Management
The
cert command is used to manipulate Red Hat content certificates.
rhui-manager cert info- Display information about the current content certificate.
rhui-manager cert upload- Use this command to upload a new content certificate. Specify the full path to the new certificate with the
--certflag, and the full path to the new key with the--keyflag. RHUI Manager and all repositories will be updated automatically when using this command.$ rhui-manager cert upload --cert /home/example/content-cert.crt --key /home/example/content-key.pem
Repository Management
The
repo command is used to manipulate repositories on the RHUI.
rhui-manager repo list- Displays a list of repositories currently in the RHUI:
$ rhui-manager repo list ID :: Repository Name Red Hat Repositories --------------------- rhui-srpms-1.2-5Server-x86_64 :: Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) rhui-srpms-1.2-5Server-i386 :: Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) rhui-1.2-5Server-x86_64 :: Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) rhui-1.2-5Server-i386 :: Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) Custom Repositories --------------------- repo_1 :: Custom Repository 1
rhui-manager repo info- Displays information about a specified repository. Specify the name of the repository with the
--repo_idflag. The repository ID is shown in the output of therhui-manager repo listcommand.$ rhui-manager repo info --repo_id rhui-1.2-5Server-x86_64 Name: Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) Type: Red Hat Relative Path: content/dist/rhel/rhui/server/5Server/x86_64/rhui/1.2/os Package Count: 13 Last Sync: 04-16-2011 21:58 Next Sync: 04-16-2011 23:44
Package Management
The
packages command is used to manipulate packages on repositories.
rhui-manager packages list- Displays a list of all packages in a repository. Specify the name of the repository with the
--repo_idflag. The repository ID is shown in the output of therhui-manager repo listcommand:$ rhui-manager packages list --repo_id rhui-1.2-5Server-x86_64 PyYAML-3.08-4.el5.x86_64.rpm grinder-0.0.57-1.el5.noarch.rpm httpd-2.2.3-43.el5_5.3.x86_64.rpm libyaml-0.1.2-3.el5.x86_64.rpm m2crypto-0.16-6.1.el5_5.1.x86_64.rpm mod_python-3.3.1-12.el5.x86_64.rpm python-hashlib-20081119-5.el5.x86_64.rpm python-pycurl-7.15.5.1-4.el5.x86_64.rpm rh-cds-0.27-1.el5_5.noarch.rpm rh-rhua-0.91-1.el5_5.noarch.rpm rh-rhua-0.95-1.el5_5.noarch.rpm rh-rhui-tools-0.76-1.el5_5.noarch.rpm rpm-build-4.4.2.3-20.el5_5.1.x86_64.rpm
rhui-manager packages upload- Use this command to upload a new package to a custom repository. Specify the repository to upload the packages to with the
--repo_idflag, and the full path to an.rpmfile or directory containing.rpmfiles with the--packagesflag. The repository ID is shown in the output of therhui-manager repo listcommand.$ rhui-manager packages upload --repo_id rhui-1.2-5Server-x86_64 --packages /home/example/filename.rpm
Status
The
status command is used to check the status of the RHUI.
rhui-manager status- Displays a short summary of whether or not CDS instances are running.
$ rhui-manager status US East Region CDS .......................................... [ UP ]
Use the--codeflag to display a code that reflect the state of the RHUI (where an output of0means the RHUI is running, and any other output means one or more CDS instances have failed).$ rhui-manager status --code 0

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.