这是 Solaris 10 x86 的默认安装。无需调整或自定义。
1)我首先启用apache2。
bash-3.00# svcadm 启用 apache2
2)重新启动apache2
bash-3.00# svcadm 重新启动 apache2
3)检查服务是否正在运行。
bash-3.00# svcs | grep apache
legacy_run Aug_08 lrc:/etc/rc3_d/S50apache
maintenance 18:41:16 svc:/network/http:apache2
4) 该服务已进入维护状态,因此我正在查看问题的解释。
bash-3.00# svcs -xv
svc:/network/http:apache2 (Apache 2 HTTP server)
State: maintenance since Thu Aug 11 18:41:16 2011
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/apache2/man -s 8 httpd
See: /var/svc/log/network-http:apache2.log
5)对日志文件进行分类。
bash-3.00# cat /var/svc/log/network-http:apache2.log
[ Aug 4 15:09:31 Rereading configuration. ]
[ Aug 11 12:54:23 Enabled. ]
[ Aug 11 12:59:58 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ Aug 11 12:59:58 Method "start" exited with status 96 ]
[ Aug 11 17:35:48 Leaving maintenance because disable requested. ]
[ Aug 11 17:35:48 Disabled. ]
[ Aug 11 17:40:26 Enabled. ]
[ Aug 11 17:40:26 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ Aug 11 17:40:26 Method "start" exited with status 96 ]
[ Aug 11 17:41:05 Leaving maintenance because clear requested. ]
[ Aug 11 17:41:05 Enabled. ]
[ Aug 11 17:41:05 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ Aug 11 17:41:05 Method "start" exited with status 96 ]
[ Aug 11 18:40:30 Leaving maintenance because clear requested. ]
[ Aug 11 18:40:30 Enabled. ]
[ Aug 11 18:40:30 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ Aug 11 18:40:30 Method "start" exited with status 96 ]
[ Aug 11 18:41:16 Leaving maintenance because clear requested. ]
[ Aug 11 18:41:16 Enabled. ]
[ Aug 11 18:41:16 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ Aug 11 18:41:16 Method "start" exited with status 96 ]
我不知道如何从这个地方继续“方法“start”以状态 96 退出”
答案1
SMF_EXIT_ERR_CONFIG
当 SMF 检查文件是否存在且文件缺失时,将返回代码。/etc/apache2/httpd.conf
默认的 Solaris Apache 安装将提供几个模板文件/etc/apache2
,请将其中一个复制到/etc/apache2/httpd.conf
例如
cp /etc/apache2/httpd.std.conf /etc/apache2/httpd.conf
一旦您有了httpd.conf
文件,任何后续错误消息都将被发送至/var/apache2/logs/error_log
。
您可能需要更改 /etc/apache2/httpd.conf 以使 Apache 在您的环境中运行。