In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to disable SELinux on CentOS 8, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
SELinux is a security function embedded in the Linux kernel, also known as security enhanced Linux,SELinux for mandatory access control can restrict users to some rules and policies, and prevent users from performing unauthorized tasks in the Linux system.
1. Check the status of SELinux
First, let's check the status of SELinux. To do this, simply run the command.
# sestatus
From the output above, we can clearly see that it is enabled by default and is in mandatory mode.
2. Disable SELinux (temporarily).
To temporarily disable SELinux or set the SELinux state from the target state to the allowed state, run the command.
# sudo setenforce 0
Temporarily close SELinux
In addition, you can use the Permissive option instead of 0, as shown below
# sudo setenforce Permissive
3. Permanent outage
The configuration file for SELinux is located in the / etc/selinux/config path. To disable SELinux, open the configuration file and set the SELINUX parameter to disabled. Therefore, open the configuration file
Vim / etc / selinux / config
Set SELINUX to disable, as shown below.
Save and exit the configuration file.
4. Restart the CentOS 8 system
For the changes to take effect, restart the system using the following command.
# restart
# shutdown-r now
# init 6
5. Verify SELinux status
Once the system is successfully rebooted, now check the status of SELinux to make sure it is indeed disabled.
# sestatus
At this point, we have successfully disabled SELinux on the CentOS 8 server.
SELinux provides security for your system and uses policies to restrict users' behavior on the system. In essence, disabling SELinux is not a good idea, however, in some cases it is necessary to disable it. In this article, we have demonstrated how to disable SELinux on a CentOS 8 server.
The above is all the contents of the article "how to disable SELinux on CentOS 8". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.