If you need to configure selinux turn on or turn off that you can read this post .


  1. first login to ssh
  2. type code below and inter

    nano /etc/sysconfig/selinux
  3. the result should be like this

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    # SELINUXTYPE= can take one of these two values:
    #     targeted - Targeted processes are protected,
    #     mls - Multi Level Security protection.

  4. You can change the value of SELINUX with your needed configuration .
  5. for saving the configurtaion file heat CTRL+x and then type y to save and exit .
  6. You should reboot the server after selinux confguration .


If you need to see SELinux Status you can use code below


the result should be like this

root@server [~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          permissive
Policy version:                 24
Policy from config file:        targeted

 Selinux Configuration In Linux