这是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 ]
我不知道如何从这个地方继续“方法”开始“退出状态96”
当SMF检查/etc/apache2/httpd.conf文件的存在并且丢失时,将返回SMF_EXIT_ERR_CONFIG代码。 将在/etc/apache2提供一个默认的Solaris Apache安装,并将其中一个模板文件复制到/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在您的环境中运行。