它看起来像我的httpd服务在centos上无法创build/ var / run / httpd导致他拒绝启动。
只是提醒你们,/ var / run指向/ run
[root@build72 var]# ls -ld /var/run lrwxrwxrwx. 1 root root 6 Oct 28 2014 /var/run -> ../run
/ run是一个tempfs(内容在机器重新启动后被擦除):
[root@build72 var]# mount | grep /run tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=800948k,mode=700)
我总是需要创build/ run / httpd,这样我的httpd服务才会启动,否则就会失败:
mkdir /run/httpd
error_logs中的输出如下所示:
[Tue Nov 08 11:10:29.378421 2016] [auth_digest:notice] [pid 1370] AH01757: generating secret for digest authentication ... [Tue Nov 08 11:10:29.378447 2016] [auth_digest:error] [pid 1370] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /run/httpd/authdigest_shm.1370 [Tue Nov 08 11:10:29.378459 2016] [auth_digest:error] [pid 1370] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled [Tue Nov 08 11:10:29.378462 2016] [:emerg] [pid 1370] AH00020: Configuration Failed, exiting
CentOS版本:
CentOS Linux release 7.2.1511 (Core)
httpd版本:
[root@build72 var]# httpd -v Server version: Apache/2.4.6 (CentOS) Server built: Jul 18 2016 15:30:14
selinux被禁用。
任何帮助,将不胜感激。 谢谢 !