SELinux
If required by your organization and you need to opt in to using SELinux, follow these instructions to enable SELinux on your Cloud Management Platform (CMP) host
Before you begin
Take a VM snapshot of your CMP host before making any operating system changes.
Enabling SELinux
Log in to your CMP host and run the following command: getenforce. If this reports that SELinux is disabled, run the following command, then reboot the host:
sed -i "s/SELINUX=.*$/SELINUX=permissive/g" /etc/selinux/config
This will tell the host to run in permissive SELinux mode upon reboot.
Permissive SELinux
To set SELinux back to Permissive mode, run the following commands on the host:
setenforce permissive
sed -i "s/SELINUX=.*$/SELINUX=permissive/g" /etc/selinux/config
Enforcing SELinux
If getenforce reports that SELinux is in permissive mode, run the following command to temporarily set the host in enforcing mode:
setenforce enforcing
To permanently set the host in enforcing mode, run the following command and reboot the host:
sed -i "s/SELINUX=.*$/SELINUX=enforcing/g" /etc/selinux/config
This will put the host in enforcing mode when it reboots.