美文网首页
Job for XXXX failed because the

Job for XXXX failed because the

作者: 板栗炖牛肉 | 来源:发表于2021-01-28 09:44 被阅读0次

前言

操作系统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

一堆检查

都没毛病。(配置问题请移步其他文章)

解决方案

  1. 运行如下,临时关闭
# setenforce 0
或
# setenforce Permissive
  1. 正常运行,eslinux的锅

  2. 永久关闭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

相关文章

网友评论

      本文标题:Job for XXXX failed because the

      本文链接:https://www.haomeiwen.com/subject/cclttltx.html