Thursday, April 26, 2012

Turn on SELinux in Redhat or CentOS Linux Over Remote SSH Session

My hosting company disabled SELinux protection. How do I turn on SELinux over remote ssh session without distributing existing networking services?

You can enable SELinux it by typing the following commands:
#genhomedircon
# touch /.autorelabel
# reboot

After reboot turn it on:
# setenforce 1
You need to modify /etc/grub.conf or /etc/selinux/config to enable SELinux after each reboot. Edit /etc/selinux/config, enter:
# vi /etc/selinux/config
Edit/add as follows:
SELINUX=enforcing
SELINUXTYPE=targeted

No comments:

Post a Comment