Upon registration, OS Management Hub attaches the required software sources to the station instance (Oracle Linux 8 BaseOS and Oracle Linux 8 Appstream). This ensures OS Management Hub can provide updates to the instance acting as the station.
Ensure the instance is synchronized with a time server (NTP). For example, configure Chrony.
Ensure the instance can reach OCI on port tcp/443.
Install Required Packages 🔗
The management station runs as an Apache server application in its role as a network proxy and local yum mirror for the OS Management Hub service. You must install the required Apache web server and start and enable the httpd service.
If your management station is using SELinux, you must also install the policycoreutils-python-utils package, which provides the necessary utilities for managing SELinux.
Log into the instance as a user with sudo privileges.
Install the required SELinux package and any dependencies.
Copy
sudo dnf install -y policycoreutils-python-utils
Add the Management Station Profile to the Instance 🔗
Add the management station profile to the instance. The profile identifies the instance as a management station. The profile can be used to register only a single management station. You can't reuse management station profiles.
In the Console, copy the contents of the management station profile.
Open the navigation menu and select Observability & Management. Under OS Management Hub, select Management stations.
Select the name of the management station whose profile you want to use.
Select View Profile.
Copy the contents of the profile.
Log in to the instance as a user with sudo privileges
Create the /etc/osmh-profile file (with no file extension on the filename) using a text editor. For example:
Copy
sudo vi /etc/osmh-profile
Paste the profile contents that you copied from the Console and save the file.
Install the Management Agent
🔗
Install the Management Agent software on the management station instance. OS Management Hub requires that a Management Agent be installed on the instance and provides a service plugin to the Management Agent service.
Confirm the following lines are present. If not, add them and save the file.
Copy
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
Install required packages. This includes JDK8 or JRE8 (minimum 1.8u281 or a later 1.8 version).
Java Development Kit (JDK) or Java Runtime Environment (JRE) must be installed on the instance before you install the Management Agent software. The Management Agent requires JDK8 only.
Copy
sudo dnf install -y java-1.8.0-openjdk
Set the JAVA_HOME environmental variable to use JDK8. Setting the variable ensures MACS uses the correct Java version when newer versions are on the system.
Create the Management Agent response file on the management station instance and configure the response file to use the Management Agent with the OS Management Hub service plugin to register the instance with OS Management Hub service
Configure the Management Agent plugin to run as root. The OS Management Hub plugin needs to run as root to patch the instance. For example:
Copy
sudo tee /etc/sudoers.d/mgmt_agent <<EOF
## Allows Management Agent to change ownership of deployed External Plugin
mgmt_agent ALL=(ALL) NOPASSWD:/opt/oracle/mgmt_agent/agent_inst/bin/chown_recursive_ep.sh
## Allows Management Agent to run External Plugin under root user
mgmt_agent ALL=(root) NOPASSWD:SETENV: /opt/oracle/mgmt_agent/plugins/osmh/*/osmh
EOF
A successful setup returns the following message: Agent setup completed and the agent is running. The setup of the OS Management Hub plugin can take another few minutes in the background.
Configure the firewall and SELinux settings to permit traffic and access.
The management station uses the ports defined during setup for synchronizing the yum mirror and managing proxy traffic to OCI.
You can manually update the firewall rules and SELinux settings or use the station-setup.sh script.
The station-setup.sh script configures the firewall and SELinux settings to permit traffic on the ports that you have specified in the proxy configuration on the management station and the Apache HTTP web server to serve packages from the path in the mirror configuration. The script handles firewall and SELinux configuration for mirrors using the xfs, ext4, btrfs, or nfs file system.
Important
For your convenience, the station-setup.sh script is available to configure the firewall and SELinux settings. Before running the script in your production environment, be sure to review the script and understand the changes that the script makes to your firewall and SELinux settings.
If you receive a command not found or No such file error message, wait a few minutes for the setup of the OS Management Hub plugin to complete and the station-setup.sh script to become available. If the issue persists, the registration might have failed. See Registration Failed for Instance or Management Station.
If you didn't run the station-setup.sh script, restart the Apache HTTP web server.
Copy
sudo systemctl restart httpd
Verify Management Station Registration and Details 🔗
Verify that the management station is registered with OS Management Hub as an instance and is available to mirror and distribute content to instances in the data center.
Open the navigation menu and select Observability & Management. Under OS Management Hub, select Management stations.
Under List scope, select the compartment that contains the management station.
Verify that the management station is listed in the table and that its status is Active.
After registering the management station, consider performing the following actions:
Attach software sources to the management station to schedule jobs to patch the management station. By default, only Oracle Linux 8 BaseOS and Appstream are attached to the management station instance.