• Aucun résultat trouvé

Subscription and Support

To receive updates to the software on a Red Hat Enterprise Linux system it must be subscribed to the Red Hat Content Delivery Network (CDN) and the appropriate repositories enabled. This part describes how to subscribe a system to the Red Hat Content Delivery Network.

Red Hat provides support via the Customer Portal, and you can access this support directly from the command line using the Red Hat Su p p o rt T o o l. This part describes the use of this command-line tool.

Chapter 5. Registering the System and Managing Subscriptions

The subscription service provides a mechanism to handle Red Hat software inventory and allows you to install additional software or update already installed programs to newer versions using the yu m package manager. In Red Hat Enterprise Linux 7 the recommended way to register your system and attach subscriptions is to use Red Hat Subscription Management.

Note

It is also possible to register the system and attach subscriptions after installation during the firstboot process. For detailed information about firstboot see the Initial Setup and Firstboot chapter in the Installation Guide for Red Hat Enterprise Linux 7. Note that firstboot is only available on systems after a graphical installation or after a kickstart installation where a desktop and the X window system were installed and graphical login was enabled.

5.1. Regist ering t he Syst em and At t aching Subscript ions

Complete the following steps to register your system and attach one or more subscriptions using Red Hat Subscription Management. Note that all subscri pti o n-manag er commands are supposed to be run as ro o t.

1. Run the following command to register your system. You will be prompted to enter your user name and password. Note that the user name and password are the same as your login credentials for Red Hat Customer Portal.

subscri pti o n-manag er reg i ster

2. Determine the pool ID of a subscription that you requires. To do so, type the following at a shell prompt to display a list of all subscriptions that are available for your system:

subscri pti o n-manag er l i st --avai l abl e

For each available subscription, this command displays its name, unique identifier,

expiration date, and other details related to your subscription. The pool ID is listed on a line beginning with P o o l ID.

3. Attach the appropriate subscription to your system by entering a command as follows:

subscri pti o n-manag er attach --po o l = pool_id

Replace pool_id with the pool ID you determined in the previous step. To verify the list of subscriptions your system has currently attached, at any time, run:

subscri pti o n-manag er l i st --co nsumed

Note

The auto -attach option automatically attaches compatible subscriptions to the system so that you can register the system and attach subscriptions in one step by executing the following command:

subscri pti o n-manag er reg i ster --auto -attach

For more information on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the Red Hat Subscription Management collection of guides.

5.2. Managing Soft ware Reposit ories

When a system is subscribed to the Red Hat Content Delivery Network, a repository file is created in the /etc/yum. repo s. d / directory. To verify that, use yu m to list all enabled repositories:

yum repo l i st

Red Hat Subscription Management also allows you to manually enable or disable software repositories provided by Red Hat. To list all available repositories, use the following command:

subscri pti o n-manag er repo s --l i st

The repository names depend on the specific version of Red Hat Enterprise Linux you are using and are in the following format:

rhel-variant-rhscl-version-rpms

rhel-variant-rhscl-version-debug-rpms rhel-variant-rhscl-version-source-rpms

Where variant is the Red Hat Enterprise Linux system variant (server or wo rkstati o n), and version is the Red Hat Enterprise Linux system version (6 or 7), for example:

rhel-server-rhscl-7-eus-rpms

rhel-server-rhscl-7-eus-source-rpms rhel-server-rhscl-7-eus-debug-rpms To enable a repository, enter a command as follows:

subscri pti o n-manag er repo s --enabl e repository

Replace repository with a name of the repository to enable.

Similarly, to disable a repository, use the following command:

subscri pti o n-manag er repo s --d i sabl e repository

Section 7.5, “ Configuring Yum and Yum Repositories” provides detailed information about managing software repositories using yu m.

5.3. Removing Subscript ions

To remove a particular subscription, complete the following steps.

1. Determine the serial number of the subscription you want to remove by listing information about already attached subscriptions:

subscri pti o n-manag er l i st --co nsumed

The serial number is the number listed as seri al. For instance, 74 4 9 9 3814 2510 16 831 in the example below:

SKU: ES0113909 Contract: 01234567 Account: 1234567

Serial: 744993814251016831

Pool ID: 8a85f9894bba16dc014bccdd905a5e23 Active: False

Quantity Used: 1

Service Level: SELF-SUPPORT Service Type: L1-L3

Status Details:

Subscription Type: Standard Starts: 02/27/2015 Ends: 02/27/2016 System Type: Virtual

2. Enter a command as follows to remove the selected subscription:

subscri pti o n-manag er remo ve --seri al = serial_number

Replace serial_number with the serial number you determined in the previous step.

To remove all subscriptions attached to the system, run the following command:

subscri pti o n-manag er remo ve --al l