此内容没有您所选择的语言版本。
Chapter 2. Installing Satellite Server
You can use this chapter to find information about installing Red Hat Satellite Server, performing the initial configuration, creating and installing manifests, and performing additional configuration.
Red Hat Satellite 6.4 uses Puppet 5 by default. Review and update your Puppet modules to support Puppet 5. For more information about updating your Puppet modules to support Puppet 5, see the Upgrading Puppet section in the Satellite 6.4 Upgrading and Updating Red Hat Satellite guide.
Ensure you have completed upgrading your Puppet modules to support Puppet 4 while on Red Hat Satellite 6.3. For information on upgrading Puppet modules to Puppet 4, see the Upgrading Puppet section in the Satellite 6.3 Upgrading and Updating Red Hat Satellite guide.
There are two methods of installing Satellite Server:
Connected:
You can obtain the packages required to install Satellite Server directly from the Red Hat Content Delivery Network (CDN). Using the CDN ensures that your system always receives the latest updates.
Disconnected:
You must use an external computer to download an ISO image of the packages and copy the packages to the system you want to install Satellite Server on. Use an ISO image only if you require a disconnected environment. The ISO image might not contain the latest updates.
You cannot register Satellite Server to itself.
When the intended host for the Red Hat Satellite Server is in a disconnected environment, it is possible to install the Satellite Server by using an ISO image. This method is not recommended for any other situation as ISO images might not contain the latest updates, bug fixes, and functionality.
If the base system has not been updated from the Red Hat CDN, package dependency errors are possible. You must manually download and install the latest version of the required packages. For more information, see Section 2.1.4, “Resolving Package Dependency Errors”.
Before You Begin
-
A copy of the repositories used in the installation are stored in the
/opt/
directory. Ensure you have a minimum of 3 GB of space for this file system and directory.
2.1.1. Downloading the Binary DVD Images 复制链接链接已复制到粘贴板!
- Go to Red Hat Customer Portal and log in.
- Click DOWNLOADS.
- Select Red Hat Enterprise Linux.
Ensure that you have the correct product and version for your environment.
- Product Variant is set to Red Hat Enterprise Linux Server.
- Version is set to the latest minor version of the product you plan to use as the base system.
- Architecture is set to the 64 bit version.
- On the Product Software tab, download the Binary DVD image for the latest Red Hat Enterprise Linux Server version.
- Click DOWNLOADS and select Red Hat Satellite.
Ensure that you have the correct product and version for your environment.
- Product Variant is set to Red Hat Satellite.
- Version is set to the latest minor version of the product you plan to use as the base system.
- Architecture is set to the 64 bit version.
- On the Product Software tab, download the Binary DVD image for the latest Red Hat Satellite version.
Copy the ISO files to
/var/tmp
on the Satellite base system or other accessible storage device.scp localfile username@hostname:remotefile
# scp localfile username@hostname:remotefile
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create a directory to serve as the mount point for the ISO file corresponding to the base system’s version.
mkdir /media/rhel7-server
# mkdir /media/rhel7-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the ISO image for Red Hat Enterprise Linux to the mount point.
mount -o loop rhel7-Server-DVD.iso /media/rhel7-server
# mount -o loop rhel7-Server-DVD.iso /media/rhel7-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the ISO file’s repository data file.
cp /media/rhel7-server/media.repo /etc/yum.repos.d/rhel7-server.repo
# cp /media/rhel7-server/media.repo /etc/yum.repos.d/rhel7-server.repo
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the repository data file and add the
baseurl
directive.baseurl=file:///media/rhel7-server/
baseurl=file:///media/rhel7-server/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the repository has been configured.
yum repolist
# yum repolist
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a directory to serve as the mount point for the ISO file of the Satellite Server.
mkdir /media/sat6
# mkdir /media/sat6
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the ISO image for Red Hat Satellite Server to the mount point.
mount -o loop sat6-DVD.iso /media/sat6
# mount -o loop sat6-DVD.iso /media/sat6
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.1.3. Installing from the Offline Repositories 复制链接链接已复制到粘贴板!
Ensure the ISO images for Red Hat Enterprise Linux Server and Red Hat Satellite are mounted:
findmnt -t iso9660
# findmnt -t iso9660
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Import the Red Hat GPG keys:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure the base system is up to date with the Binary DVD image:
yum update
# yum update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change to the directory where the Satellite ISO is mounted:
cd /media/sat6/
# cd /media/sat6/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the installation script in the mounted directory:
./install_packages
# ./install_packages
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you have successfully installed the Satellite packages, the following message is displayed:
Install is complete. Please run satellite-installer --scenario satellite
.
2.1.4. Resolving Package Dependency Errors 复制链接链接已复制到粘贴板!
If there are package dependency errors during installation of Satellite Server packages, you can resolve the errors by downloading and installing packages from Red Hat Customer Portal. For more information about resolving dependency errors, see the KCS solution How can I use the yum output to solve yum dependency errors?.
If you have successfully installed the Satellite packages, skip this procedure.
Procedure
- Go to the Red Hat Customer Portal and log in.
- Click DOWNLOADS.
- Click the Product that contains the package that you want to download.
- Ensure that you have the correct Product Variant, Version, and Architecture for your environment.
- Click the Packages tab.
- In the Search field, enter the name of the package.
- Click the package.
- From the Version list, select the version of the package.
- At the bottom of the page, click Download Now.
- Copy the package to the Satellite base system.
On Satellite Server, change to the directory where the package is located:
cd /path-to-package/
# cd /path-to-package/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the package locally:
yum localinstall package_name
# yum localinstall package_name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change to the directory where the Satellite ISO is mounted:
cd /media/sat6/
# cd /media/sat6/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that you have resoled the package dependency errors by installing the Satellite Server packages. If there are further package dependency errors, repeat this procedure.
./install_packages
# ./install_packages
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you have successfully installed the Satellite packages, the following message is displayed:
Install is complete. Please run satellite-installer --scenario satellite
.
2.2. Performing the Initial Configuration 复制链接链接已复制到粘贴板!
This section details how to perform the initial configuration of the host operating system when installing Red Hat Satellite Server. This includes synchronizing the time, installing the sos package, and specifying an installation option.
Before you continue, consider which manifests or packages are relevant for your environment. For more information on manifests, see Managing Subscriptions in the Red Hat Satellite Content Management Guide.
2.2.1. Synchronizing Time 复制链接链接已复制到粘贴板!
You must start and enable a time synchronizer on the host operating system to minimize the effects of time drift. If a system’s time is incorrect, certificate verification can fail.
Two NTP based time synchronizers are available: chronyd
and ntpd
. The chronyd
implementation is specifically recommended for systems that are frequently suspended and for systems that have intermittent network access. The ntpd
implementation should only be used when you specifically need support for a protocol or driver not yet supported by chronyd
.
For more information about the differences between ntpd
and chronyd
, see Differences Between ntpd and chronyd in the Red Hat Enterprise Linux 7 System Administrator’s Guide.
Synchronizing Time using chronyd
Install chronyd.
yum install chrony
# yum install chrony
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start and enable the chronyd service.
systemctl start chronyd systemctl enable chronyd
# systemctl start chronyd # systemctl enable chronyd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You should install the sos package on the host operating system. The sos package enables you to collect configuration and diagnostic information from a Red Hat Enterprise Linux system. You can also use it to provide the initial system analysis, which is required when opening a service request with Red Hat Technical Support. For more information on using sos, see the Knowledgebase solution What is a sosreport and how to create one in Red Hat Enterprise Linux 4.6 and later? on the Red Hat Customer Portal.
Install the sos package.
yum install sos
# yum install sos
2.2.3. Specifying Installation Options 复制链接链接已复制到粘贴板!
Satellite Server is installed using the satellite-installer
installation script and as part of the initial configuration, you either automatically or manually configure Satellite.
Choose from one of these two methods:
Automatic Configuration - This method is performed by using an answer file to automate the configuration process when running the installation script. An answer file is a file containing a list of parameters that are read by a command or script. The default Satellite answer file is
/etc/foreman-installer/scenarios.d/satellite-answers.yaml
. The answer file in use is set by theanswer_file
directive in the/etc/foreman-installer/scenarios.d/satellite.yaml
configuration file.To perform the initial configuration using the installation script with an answer file, see Section 2.2.3.2, “Performing the Initial Configuration Automatically using an Answer File”.
Manual Configuration - This method is performed by running the installation script with one or more command options. The command options override the corresponding default initial configuration options and are recorded in the Satellite answer file. You can run the script as often as needed to configure any necessary options.
To perform the initial configuration using the installation script with command-line options, see Section 2.2.3.1, “Performing the Initial Configuration Manually”.
Depending on the options that you use when running the Satellite installer, the configuration can take several minutes to complete. An administrator is able to view the answer file to see previously used options for both methods.
2.2.3.1. Performing the Initial Configuration Manually 复制链接链接已复制到粘贴板!
This initial configuration procedure creates an organization, location, user name, and password. After the initial configuration, you can create additional organizations and locations if required. The initial configuration also installs MongoDB and PostgreSQL databases on the same server. Depending on your deployment, using external databases can benefit performance.
The installation process can take tens of minutes to complete. If you are connecting remotely to the system, consider using a utility such as screen
that allows suspending and reattaching a communication session so that you can check the installation progress in case you become disconnected from the remote system. The Red Hat Knowledgebase article How to use the screen command describes installing screen
; alternately see the screen
manual page for more information. If you lose connection to the shell where the installation command is running, see the log at /var/log/foreman-installer/satellite.log
to determine if the process completed successfully.
Manually configuring Satellite Server
Use the satellite-installer --scenario satellite --help
command to display the available options and any default values. If you do not specify any values, the default values are used.
It is recommended to specify a meaningful value for the option: --foreman-initial-organization
. This can be your company name. An internal label that matches the value is also created and cannot be changed afterwards. If you do not specify a value, an organization called Default Organization with the label Default_Organization is created. You can rename the organization name but not the label.
By default, all configuration files configured by the installer are managed by Puppet. When satellite-installer
runs, it overwrites any manual changes to the Puppet managed files with the initial values. By default, Satellite Server is installed with the Puppet agent running as a service. If required, you can disable Puppet agent on Satellite Server using the --puppet-runmode=none
option.
If you want to manage DNS files and DHCP files manually, use the --foreman-proxy-dns-managed=false
and --foreman-proxy-dhcp-managed=false
options so that Puppet does not manage the files related to the respective services. For more information on how to apply custom configuration on other services, see Appendix A, Applying Custom Configuration to Red Hat Satellite.
If you want to use external databases with Satellite, before you run the satellite installer tool, you must set up and point to external databases. For more information, see Using External Databases with Satellite in Installing Satellite Server from a Connected Network.
The script displays its progress and writes logs to /var/log/foreman-installer/satellite.log
.
If you have been installing in a disconnected environment, unmount the ISO images.
umount /media/sat6 umount /media/rhel7-server
# umount /media/sat6
# umount /media/rhel7-server
You can use answer files to automate installations with customized options. The initial answer file is sparsely populated and after you run the satellite-installer
script the first time, the answer file is populated with the standard parameter values for installation. If you have already installed Satellite Server using the method described in Section 2.2.3.1, “Performing the Initial Configuration Manually”, then you do not need to use this method. You can, however, use it to make changes to the configuration of Satellite Server at any time.
You should use the FQDN instead of the IP address where possible in case of network changes.
Automatically configuring Satellite Server using an Answer File
Copy the default answer file
/etc/foreman-installer/scenarios.d/satellite-answers.yaml
to a location on your local file system.cp /etc/foreman-installer/scenarios.d/satellite-answers.yaml \ /etc/foreman-installer/scenarios.d/my-answer-file.yaml
# cp /etc/foreman-installer/scenarios.d/satellite-answers.yaml \ /etc/foreman-installer/scenarios.d/my-answer-file.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
To view all of the configurable options, enter the
satellite-installer --scenario satellite --help
command. - Open your copy of the answer file, edit the values to suit your environment, and save the file.
Open the
/etc/foreman-installer/scenarios.d/satellite.yaml
file and edit the answer file entry to point to your custom answer file.:answer_file: /etc/foreman-installer/scenarios.d/my-answer-file.yaml
:answer_file: /etc/foreman-installer/scenarios.d/my-answer-file.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
satellite-installer
script.satellite-installer --scenario satellite
# satellite-installer --scenario satellite
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you have been installing in a disconnected environment, unmount the ISO images.
umount /media/sat6 umount /media/rhel7-server
# umount /media/sat6 # umount /media/rhel7-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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 the Red Hat account that you used to register the system to Red Hat Subscription Management.
- 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.2.5. Adding Subscriptions to an Allocation 复制链接链接已复制到粘贴板!
The following procedure explains how to add subscriptions to an allocation.
- Navigate to Subscription 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.
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 the Satellite Server.
Both the Red Hat Satellite 6 web UI and CLI provide methods for importing the manifest.
Prerequisites
Ensure that you enable the disconnected mode on your Satellite Server. For more information, see Section 2.2.8, “Enabling the Disconnected Mode”.
For Web UI Users
- Ensure the context is set to the organization you want to use.
- Navigate to Content > Red Hat Subscriptions.
- Click Manage Manifest to display the manifest page for the organization.
- Click Choose file, select the Subscription Manifest, then click Upload.
For CLI Users
The Red Hat Satellite 6 CLI requires the manifest to be on the Satellite Server. On your local client system, copy the manifest to the Satellite Server:
scp ~/manifest_file.zip root@satellite.example.com:~/.
[user@client ~]$ scp ~/manifest_file.zip root@satellite.example.com:~/.
Then import it using the following command:
hammer subscription upload \ --file ~/manifest_file.zip \ --organization "organization_name"
[root@satellite ~]# hammer subscription upload \
--file ~/manifest_file.zip \
--organization "organization_name"
After a few minutes, the CLI reports a successful manifest import.
When you complete this section, you can enable repositories and import Red Hat content. This is a prerequisite for some of the following procedures. For more information, see Importing Red Hat Content in the Red Hat Satellite Content Management Guide.
2.2.8. Enabling the Disconnected Mode 复制链接链接已复制到粘贴板!
Enable the disconnected mode on Satellite Server. When the disconnected mode is enabled, Satellite Server does not access the Red Hat Content Delivery Network (CDN).
Procedure
To enable the disconnected mode on Satellite Server, complete the following steps:
- In the Satellite web UI, navigate to Administer > Settings.
- Click the Content tab.
-
Set the
Disconnected mode
value toYes
.
For the CLI Users
Enter the following command on Satellite Server:
hammer settings set --name content_disconnected --value true
# hammer settings set --name content_disconnected --value true