Apache/2.0.63 on Solaris10

配置httpd.conf:

Apache2.0.53使用前,配置下conf文件

1。自己造個httpd.conf

# cd /etc/apache2/
# cp httpd.conf-example httpd.conf

注意看下log文件,有問題的話請看下[httpd.conf]的1148行有些有語法錯誤哦

2。爲了能讓SVCADM控制,需要修改http-apache2.xml

# vi /var/svc/manifest/network/http-apache2.xml

 

(前)
<instance name='apache2' enabled='false'>
(変更後)
<instance name='apache2' enabled='true'>

  :w! 強制保存。

 

 

■使用SSL時

apache2的設置變更

#svccfg
svc:> select apache2
svc:/network/http:apache2> editprop
(変更前)
# setprop httpd/ssl = boolean: (false)

 

(変更後)
setprop httpd/ssl = boolean: (true)

 

 

Solaris10 Apache2 起動

■Apache2 on Solaris10的文件構成

<Apache2默認関連> 

bin   /usr/apache2/bin/

設置   /etc/apache2/httpd.conf

process ID   /var/run/apache2/httpd.pid
起動腳本 /lib/svc/method/http-apache2

Apache2log  /var/apache2/logs/access_log

webapps /var/apache2/htdocs/

<SMF関連> 

SMF用XML   /var/svc/manifest/network/http-apache2.xml 

起動停止log  /var/svc/log/network-http\:apache2.log 

■查看Version

# /usr/apache2/bin/httpd -v
Server version: Apache/2.0.53
Server built: Jul 20 2005 06:30:22

■Apache2是否起動的確認

$ svcs -a | grep http
disabled Jul_28 svc:/network/http:apache2

Apache2的FMRI全名: svc:/network/http:apache2

Apache2的FMRI省略形式: http 或 apache2

因此可以用省略形式查看狀態$ svcs http 

■Apache2相關信息查看

dependency require_all 是依賴服務,決定了apache2是否能啓動

# svcs -l http
fmri svc:/network/http:apache2
name Apache 2 HTTP server
enabled false
state disabled
next_state none
state_time Wed April 28 17:20:23 2010
restarter svc:/system/svc/restarter:default
dependency require_all/error svc:/milestone/network:default (online)
dependency require_all/none svc:/system/filesystem/local:default (online)
dependency optional_all/error svc:/system/filesystem/autofs:default (online)

■啓動Apache2起動

svcadm command:

# svcadm enable http/apache2

Apache2停止

# svcadm disable http/apache2 

Apache2 restart

# svcadm restart http 

進程查看Apache2: ps -ef -x | grep http/apache2

■Apach2的FMRI詳細確認

 Apache2的FMRI: svc:/network/http:apache2 或者 http

-x參數是詳細查看

# svcs -x http
svc:/network/http:apache2 (Apache 2 HTTP server)
State: maintenance since Thu Aug 21 06:06:07 2008
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
See: http://sun.com/msg/SMF-8000-KS
See: httpd(8)
See: /var/svc/log/network-http:apache2.log
Impact: This service is not running.

State: ...(状態)

Reason: ...(原因)

See: http://sun.com/... (参照URL)

See: ...apache2.log (参照log)

Impact: ... (影響)

posted @ 2010-05-03 09:02  荖K  阅读(243)  评论(0编辑  收藏  举报