前言
操作系统Centos8.0。碰到了如下命令
# systemctl start nignx
# Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
# systemctl start mariadb.service
# Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
全部启动失败。
检查配置,按照网上的来
# nginx -t
# nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
一堆检查
都没毛病。(配置问题请移步其他文章)
解决方案
- 运行如下,临时关闭
# setenforce 0
或
# setenforce Permissive
-
正常运行,eslinux的锅
-
永久关闭eslinux
# vim /etc/selinux/config
修改为,SELINUX=disabled,如下
# 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.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
网友评论