此内容没有您所选择的语言版本。
Chapter 2. Installing Satellite Server
2.1. Preparing for Satellite Server Installation
Ensure that you meet all the prerequisites before installing Satellite Server.
Prerequisites
- You must create a Red Hat Enterprise Linux 7 host before you can install and configure Satellite Server. Red Hat Enterprise Linux version 7.4 or later is supported. For more information about installing Red Hat Enterprise Linux 7, see the Red Hat Enterprise Linux 7 Installation Guide.
- Ensure that your environment meets the requirements for installation, including meeting storage requirements, and ensuring that network ports and firewalls are open and configured. For more information, see the Preparing your Environment for Installation in the Red Hat Satellite Installation Guide.
2.2. Registering to Red Hat Subscription Management
Registering the host to Red Hat Subscription Management enables the host to subscribe to and consume content for any subscriptions available to the user. This includes content such as Red Hat Enterprise Linux, Red Hat Software Collections (RHSCL), and Red Hat Satellite.
Register your Satellite Server, using your user name and password.
# subscription-manager register Username: Password: The system has been registered with ID: 541084ff2-44cab-4eb1-9fa1-7683431bcf9a
2.3. Identifying and Attaching the Satellite Subscription to the Host
After you have registered your host, you need to identify your Satellite subscription Pool ID. The Pool ID enables you to attach the required subscription to your host. The Satellite subscription provides access to the Satellite content, as well as Red Hat Enterprise Linux, Red Hat Software Collections (RHSCL), and Red Hat Satellite. This is the only subscription required.
To identify your Satellite subscription, enter the following command:
# subscription-manager list --all --available
The outputs displays something similar to the following:
Subscription Name: Red Hat Satellite Provides: Red Hat Satellite 6 Red Hat Enterprise Linux Server Red Hat Satellite Red Hat Enterprise Linux Load Balancer (for RHEL Server) SKU: MCT0370 Pool ID: 8a85f9874152663c0541943739717d11 Available: 3 Suggested: 1 Service Level: Premium Service Type: L1-L3 Multi-Entitlement: No Ends: 10/07/2014 System Type: Physical
- Make a note of the Pool ID so that you can attach it to your Satellite host. Your Pool ID will be different than the example provided.
To attach your subscription to your Satellite Server, enter the following command, using your Pool ID:
# subscription-manager attach --pool=8a85f9874152663c0541943739717d11
The outputs displays something similar to the following:
Successfully attached a subscription for: Red Hat Satellite
To verify that the subscriptions are successfully attached, enter the following command:
# subscription-manager list --consumed
The outputs displays something similar to the following:
+-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Satellite Provides: Red Hat Satellite Red Hat Enterprise Linux Server Red Hat Software Collections (for RHEL Server) Red Hat Satellite Red Hat Satellite 6 Red Hat Software Collections (for RHEL Server) Red Hat Satellite Capsule Red Hat Enterprise Linux Load Balancer (for RHEL Server) Red Hat Satellite with Embedded Oracle Red Hat Satellite Capsule Red Hat Enterprise Linux High Availability (for RHEL Server) SKU: MCT0370 Contract: 10293569 Account: 5361051 Serial: 1653856191250699363 Pool ID: 8a85f9874152663c0541943739717d11 Active: True Quantity Used: 1 Service Level: Premium Service Type: L1-L3 Status Details: Starts: 10/08/2013 Ends: 10/07/2014 System Type: Physical
2.4. Configuring Repositories
Disable all existing repositories.
# subscription-manager repos --disable "*"
Enable the Red Hat Enterprise Linux Server, Red Hat Software Collections, and the Red Hat Satellite repositories.
The following example uses Red Hat Enterprise Linux 7.
# subscription-manager repos \ --enable rhel-7-server-rpms \ --enable rhel-server-rhscl-7-rpms \ --enable rhel-7-server-satellite-6.3-rpms
NoteIf you are using a different version of Red Hat Enterprise Linux, change the repository based on your specific version.
Clear out any metadata.
# yum clean all
Verify that the repositories have been enabled.
# yum repolist enabled
2.5. Installing Satellite Server
Install the Satellite Server package.
# yum install satellite
Install Satellite Server and perform the initial configuration.
# satellite-installer --scenario satellite \ --foreman-initial-organization "$ORG" \ --foreman-initial-location "$LOCATION" \ --foreman-admin-password redhat \ --foreman-proxy-puppetca true \ --foreman-proxy-tftp true \ --enable-foreman-plugin-discovery
2.6. Configuring the Hammer CLI
You can create saved credentials so that you do not have to type them in each time you issue a command. You can also configure the server so that the admin
user defaults to logging into a specific organization and location.
Create the
~/.hammer/cli_config.yml
file if it does not already exist.# mkdir ~/.hammer # touch
~/.hammer/cli_config.yml
To protect your password, make sure the file is only readable by the current user. For example, if you plan to issue hammer commands as root, execute the following command.
# chmod 600 ~/.hammer/cli_config.yml
Add the following content to the file.
:foreman: :host: 'https://satellite.example.net/' :username: 'admin' :password: 'redhat'
ImportantDo not use tabs in your
~/.hammer/cli_config.yml
file. Always use indentation by spaces.Configure the
admin
user to default to logging in to the specified organization and location.# hammer user update --login admin \ --default-location-id 1 \ --default-organization-id 1 \ --locations "$LOCATION" \ --organizations "$ORG"
2.7. Creating a Subscription Allocation in Customer Portal
To create a manifest, you must first create an allocation and then export the manifest from the allocation.
You can access your subscription information on the Red Hat Customer Portal. You can also assign subscriptions for use in on-premise management applications, such as Red Hat Satellite, using subscription allocations.
- Open https://access.redhat.com/ in your browser and log in to your Red Hat account.
- Navigate to Subscriptions in the upper-left corner of the Customer Portal.
- Navigate to Subscription Allocations.
- Click Create New subscription allocation
- In the Name field, enter a name.
- From the Type list, select the type and version that corresponds to your Satellite Server.
- Click Create.
2.7.1. Adding Subscriptions to an Allocation
The following procedure explains how to add subscriptions to an allocation.
- Navigate to Subscriptions Allocations.
- Select the name of the subscription you want to change.
- Click the Subscriptions tab.
- Click Add Subscriptions.
- A list of your Red Hat product subscriptions appears. Enter the Entitlement Quantity for each product.
- Click Submit to complete the assignment.
When you have added subscriptions to the allocation, export the manifest file.
2.8. Exporting a Subscription Manifest from the Customer Portal
While viewing a subscription allocation that has at least one subscription, you can export a manifest in either of two places:
- From the Details tab, under the Subscription section, by clicking the Export Manifest button.
- From the Subscriptions tab, by clicking the Export Manifest button.
When the manifest is exported, the Customer Portal encodes the selected subscriptions certificates and creates a .zip archive. This is the Subscription Manifest, which can be uploaded into Satellite Server.
2.9. Uploading a Manifest to Your Satellite Server
Uploading a Manifest Using the Web UI
- Verify that you are in the correct organization.
- Click Content > Red Hat Subscriptions.
- Click Manage Manifest to open the Subscriptions page.
- Click Choose file and select the manifest you created.
- Click Upload to upload the manifest to Satellite Server.
Uploading a Manifest Using Hammer CLI
Upload a manifest to Satellite Server.
# hammer subscription upload \ --file ~/manifest_file.zip \ --organization "organization_name"