The xFusionCorp Industries security team recently did a security audit of their infrastructure and came up with ideas to improve the application and server security. They decided to use SElinux for an additional security layer. They are still planning how they will implement it; however, they have decided to start testing with app servers, so based on the recommendations they have the following requirements:
Install the required packages of SElinux on App server 2 in Stratos Datacenter and disable it permanently for now; it will be enabled after making some required configuration changes on this host. Don't worry about rebooting the server as there is already a reboot scheduled for tonight's maintenance window. Also ignore the status of SElinux command line right now; the final status after reboot should be disabled.
Answer:
#ssh to the server
ssh <user>@<server>
#switch to root user
sudo su
#install selinux
yum install selinux
#check selinux status ( it shows as SELINX=enforcing)
cat /etc/selinux/config | grep SELINUX
SELINUX= enforcing
#can check the above sestaus using thiscoomand too
sestatus
#disbale the selinux ( i use sed coammnd to doteh task but you can do the chnage manually too )
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
# chekc again now
cat /etc/selinux/config | grep SELINUX
SELINUX= disabled
#or use below command
sestatus
Note: Commands are correct but based on your question the server and user name, other details might differ so please do check.
No comments:
Post a Comment