Before installing PEM via an RPM method it is mandatory to disable SELinux. If SELinux is disabled using setenforce 0, this command changes SELinux at runtime. Consequently, one can access the PEM web interface through browser and it works without any issue. However, the next time the OS is rebooted, the SELinux setting will be changed back to its default, and on the PEM web interface, the below error message will appear and prevent login :
could not connect to server: Permission denied Is the server running on host "x.x.x.x" and accepting TCP/IP connections on port 5444 ?
Taking a look at the SELinux settings again, we'll discover it's been reverted back to the default:
[root@localhost Desktop]# getenforce
To allow Apache to connect to database through SELinux, use the below command:
The -P option makes the change permanent. Without this option, the boolean would be reset to 0 at reboot.
To verify the settings :
[root@localhost Desktop]# getsebool -a | grep httpd_can_network
httpd_can_network_connect --> on
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> on
httpd_can_network_memcache --> off
httpd_can_network_relay --> off