Enable OS Management Service (OSMS agent) for A Oracle Linux 8 Instance (OCI Linux)

By default, the OS Management Service Agent plugin is enabled on Oracle Linux 6 and 7 instances. For Oracle Linux 8 instances, the OS Management Service Agent plugin is disabled by default because of limitations with managing application streams in Oracle Linux 8.

To use the OS Management service with Oracle Linux 8, you must enable the OS Management Service Agent plugin. To Enable the OS management Service plugin on Oracle Linux 8, the following sed utility script needs to be run on the Linux Instance.

1. Run the script below on the Linux instance:

# sudo sed -i.saved -e '/^  osms:/,/^  [a-z]*:/{
   s/\(.*disabled:.*\)true/\1false/
   /^.*disableByOs:$/,/^  [a-z]*:/{
   /^.*-.*Oracle Linux Server.*:$/d
   /^.*-.*8.x/d}}' /etc/oracle-cloud-agent/agent.yml

This script updates the osms configuration in the /etc/oracle-cloud-agent/agent.yml file by changing the value for the disabled: parameter from true to false.

2. Restart the Oracle Cloud Agent.

# sudo systemctl restart oracle-cloud-agent.service

3. Verify the yum configuration: - Check that the existing yum repository configuration is disabled. - Ensure that the *.repo files in the /etc/yum.repos.d directory are backed up to *.repo.osms-backup in the same directory.

For example:

# ls /etc/yum.repos.d
ksplice-ol7.repo.osms-backup                oracle-linux-ol7.repo.osms-backup
ksplice-uptrack.repo.osms-backup            oracle-softwarecollection-ol7.repo.osms-backup
oci-included-ol7.repo.osms-backup           uek-ol7.repo.osms-backup
oracle-epel-ol7.repo.osms-backup            virt-ol7.repo.osms-backup
oraclelinux-developer-ol7.repo.osms-backup

4. Verify that the OS Management Service Agent plugin is running on the instance. For example:

# ps -elf | grep osms | grep -v grep
4 S root     24269 24245  0  80   0 - 62257 -      Jun30 ?        00:00:00 /usr/bin/sudo -n /usr/libexec/oracle-cloud-agent/plugins/osms/osms-agent
4 S root     24273 24269  0  80   0 -  2165 -      Jun30 ?        00:00:00 /usr/libexec/oracle-cloud-agent/plugins/osms/osms-agent
4 S root     24274 24273  0  80   0 - 406892 -     Jun30 ?        00:50:28 /usr/libexec/oracle-cloud-agent/plugins/osms/osms-agent