Archive for 3月, 2007

WS7で全文検索

全文検索機能について

さて今日は、Sun Java System Web Server 7.0の全文検索機能について紹介します。

はじめに

ApacheのWeb Serverでコンテンツの全文検索を行うためには、
ApacheにNamazu,Lucene,Sennaといった
検索エンジンを取って来てインストール、設定をしなければ
使うことはできません。(インストール&設定は結構大変ですよね!!

しかし、Sun Java System Web Server 7.0ではデフォルトで全文検索エンジンが
ついていますので、容易にコンテンツの全文検索ができるようになります。

詳細は、 Sun Java System Web Server 7.0 Administrator’s Guideの
Chapter 12 Working With Search Collectionsにも記載されていますので、
こちらも御参考にしてください。

手順の概要
Sun Java System Web Server 7.0で全文検索を行うためには、管理者は
管理画面から、検索機能を有効にした後、「コレクション」と呼ばれる
検索用の専用データベースを作成する必要があります。

そして、検索用のコレクションに対してインデックスを作成し、
検索ができるようになります。以降で詳細な手順を示しますので、
手順に従い設定を行ってください。

※注意事項:

1点だけ管理者が注意しなければならないことがあります。
それは、コレクションに含まれるコンテンツ(HTML,Text,PDF)は
アクセス制限が設けられているか否かに関わらず、検索結果として
出力されます。そこで管理者はアクセス制限の設けられているコンテンツに
関しては別のコレクションを作成するか、もしくは検索結果には表示されるが
そこから、実態のファイルにアクセスできないように設定する必要があります。

事前準備
Web Server 7.0をインストールしたデフォルトの状態では、
Web Server 7.0の情報を表示する画面しか表示されません。
そこで、Web Server 7.0の管理画面に付属する「ヘルプ」の
HTMLコンテンツと、http://docs.sun.comより入手できる
Web Server 7.0の関連ドキュメント(PDF版)をWeb Server上に配置し
参照できるようにします。そしてこれらのファイルを検索できるようにします。

■ 用意するHTMLファイル
* /sun/webserver7/lib/webapps/admingui/html/ja

■ 用意するPDFファイル
* Administrator’s Configuration File Reference
* Administrator’s Guide
* CLI Reference Manual
* Developer’s Guide
* Developer’s Guide to Java Web Applications
* Documentation Center
* Installation and Migration Guide
* NSAPI Developer’s Guide
* PHP Add-On 1.0
* Performance Tuning, Sizing, and Scaling Guide
* Release Notes
* Release Notes for Microsoft Windows
* Troubleshooting Guide

# pwd
/sun/webserver7/https-jse8-078/docs
# ls
img index_de.html index_es.html index_ja.html index_zh_cn.html
index.html index_en.html index_fr.html index_ko.html index_zh_tw.html
# mkdir OLD
# mv *.html img ./OLD
# mv OLD /usr/tmp
# cp -R /sun/webserver7/lib/webapps/admingui/html/ja/help /sun/webserver7/https-jse8-078/docs/
# cd /usr/tmp/PDF
# ls
AdminConfigFileReference.pdf NSAPIDevelopersGuide.pdf
AdministratorsGuide.pdf PHPAdd-On.pdf
CLIReferenceManual.pdf PerformanceTuningGuide.pdf
DevelopersGuide.pdf ReleaseNote.pdf
DevelopersGuideToJavaWebApplication.pdf ReleaseNoteForMSWindows.pdf
DocumentationCenter.pdf TroubleShootingGuide.pdf
InstallationAndMigrationGuide.pdf
# mkdir /sun/webserver7/https-jse8-078/docs/PDF
# mv /usr/tmp/PDF/*.pdf /sun/webserver7/https-jse8-078/docs/PDF

以上で静的コンテンツの準備は終了です。

全文検索機能の有効化の手順
下記の手順に従い設定を行ってください。

1.管理画面より「共通操作」の「仮想サーバを編集」を選択します。
2.仮想サーバのリストより該当の仮想サーバを選択します。
3.仮想サーバの管理画面より「検索」タブを押下します。
4.「検索アプリケーション」に必要項目を記入します。

URI: [/search]
検索アプリケーション: [*]有効
最大ヒット数: [1000]

※検索機能を利用するユーザはブラウザより
下記のURLを呼び出すことで利用可能になります。
http://VIRTUAL-SERVER-HOST:PORT/search

次に新規「検索コレクション」を作成します。

5.「新規」ボタンを押下します。
6.「新規検索コレクション」に必要項目を記入し「了解」ボタンを押下します。

*名前: [AdminHelpCollection]
表示名: [AdminHelpCollection]
説明: [WS7 ヘルプ検索コレクション]
コレクションパス: [*]デフォルトの場所にコレクションを作成します
ドキュメントルート: [../docs]
サブディレクトリ: [help]

7.検索コレクション作成の確認
正常に検索コレクションが作成されると、
「検索コレクションが正常に作成されました」のメッセージが表示されます。

8.構成の配備(反映)
追加した検索コレクションの設定を反映させる為、
「配備保留中」のリンクを押下します。
リンクを押下すると、別ウィンドウに「構成の配備」を行うための
画面が表示されますので、「配備」ボタンを押下します。

配備が完了した後、「閉じる」ボタンを押下しウィンドウを閉じます。

9.検索コレクションのドキュメントの追加

現時点で、検索コレクション用の設定は行いましたが、コレクション内に
データは存在しません。
そこで、仮に下記のURLにアクセスして、検索フィールドに文字列を入力しても
検索対象のデータが存在しないため、「検索結果が見つかりませんでした」という
文字列が表示されます。
http://VIRTUAL-SERVER-HOST:PORT/search
そこで、作成したコレクション内にHTML等の情報を含ませる必要があります。
先ほど、作成した「検索コレクション」より検索対象のコレクション
[AdminHelpCollection]のラジオボタンをチェックします。
そして、「ドキュメントの追加」ボタンを押下します。
すると下記の画面が表示されます。
ここに必要項目を入力して「了解」ボタンを押下します。

名前: AllData
*パターン: [*.html]
デフォルトエンコーディング: [Japanese auto-detect (JISAutoDetect)]
サブディレクトリ: [*] Included

10.インデキシングの終了確認
「了解」ボタンを押下すると自動的にインデキシングが開始されます。
インデキシングが開始されると、デフォルトの場合、下記のディレクトリに
インデックスが作成されていきます。

# pwd
/sun/webserver7/https-jse8-078/collections/jse8-078/AdminHelpCollection
# ls -l
合計 48
drwxr-xr-x 2 webservd webservd 512 3月 29日 15:21 converted
-rw-r–r– 1 webservd webservd 157 3月 29日 15:21 history
drwxr-xr-x 2 webservd webservd 512 3月 29日 15:21 index
drwxr-xr-x 2 webservd webservd 512 3月 29日 15:21 lock
-rw-r–r– 1 webservd webservd 19591 3月 29日 15:21 log

そして、インデックスの状態は下記のようにログファイル(log)に出力されます。

Log file for collection
created Thu Mar 29 15:21:16 JST 2007
[29/3/2007:15:21:17] IDX Adding documents:
[29/3/2007:15:21:17] IDX collection=AdminHelpCollection
[29/3/2007:15:21:17] IDX encoding=JISAutoDetect
[29/3/2007:15:21:17] IDX pattern=*.html
[29/3/2007:15:21:17] IDX /sun/webserver7/https-jse8-078/collections/jse8-078/AdminHelpCollection/index
…..中略
[29/3/2007:15:21:21] IDX Indexing /sun/webserver7/https-jse8-078/docs/help/p1.html
[29/3/2007:15:21:21] IDX Using charset UTF-8 for /sun/webserver7/https-jse8-078/docs/help/p1.html
[29/3/2007:15:21:21] MP Partition: 1, 96 documents, 7066 terms.
[29/3/2007:15:21:23] MP Finished dumping: 1 /sun/webserver7/https-jse8-078/collections/jse
8-078/AdminHelpCollection/index 2.914
[29/3/2007:15:21:24] IS 96 documents, 0.75 MB, 7.58 s, 356.00 MB/h
[29/3/2007:15:21:24] PM Waiting for housekeeper to finish
[29/3/2007:15:21:24] PM Shutdown /sun/webserver7/https-jse8-078/collections/jse8-078/Admin
HelpCollection/index AWord 1955941300
[29/3/2007:15:21:24] IDX succeeded

11.検索の確認

インデキシング作業が完了した後、実際に検索ができるかを確認してみます。
Web Serverのインスタンスが起動されていない場合起動し、
Webブラウザより検索用のURLにアクセスします。
ブラウザより下記のURLに接続してください。
http://VIRTUAL-SERVER-HOST:PORT/search
すると下記の画面が表示されます。

ここで、検索フィールドに検索キーワードを入力します。
たとえば、「コレクション」というキーワードを検索してみます。
すると下記の検索結果画面が表示されます。

以上で、全文検索ができるようになりました。
如何でしょう?
Apache + 全文検索エンジンに比べ非常に分かりやすく、
また非常に簡単に検索できるようになりました。

次回は、PDFや検索画面のカスタマイズについて報告したいと思います。

PS.
次回のアップデートは1週間後位になるかもしれません。(^_^;)

2007年3月29日 at 5:23 午前

Sun Java System Web Server 7.0 日本語版販売開始

3/27(火)に「Sun Java(TM) System Web Server 7.0 日本語版」の販売が
開始された事が報道機関向けに正式アナウンスされました。
価格は、1利用ソケットあたり242,000円で、稼動させるシステムのコア数に関
わらず、利用ソケット数に準ずるソケットライセンス方式です。対応OSは、
Solaris(TM)をはじめ、Microsoft Windows、Red Hat、SuSE、HP-UXとなっています。
詳細は下記のURLに記載されています。
Sun Java System Web Server 7.0の概要
プレスリリース
掲載記事:
http://www.yomiuri.co.jp/net/cnet/20070327nt19.htm
http://www.itmedia.co.jp/enterprise/articles/0703/27/news043.html
http://release.nikkei.co.jp/detail.cfm?relID=156386&lindID=1
http://enterprise.watch.impress.co.jp/cda/software/2007/03/27/9938.html

2007年3月27日 at 7:27 午後

WS7のSNMP設定

さて本日は、WS7上でSNMPの設定を行う方法を紹介します。
下記の手順に従い設定を行ってください。

1. wadmコンソールへログイン

コマンドラインから行う場合、コンソールにログインしてください。

# ./wadm –user=admin

admin-user-password を入力してください>

Sun Java System Web Server 7.0 B12/04/2006 10:15

wadm>

2. SNMPサブエージェントの設定
次に、SNMPサブエージェントの設定を行います。
ここで、引数はそれぞれ下記を意味します。
–config:構成を行う設定の指定
–description:説明
–location:配置するシステムの場所
–contact:担当の連絡先
–organization:組織の説明
–master-host:SNMPマスターエージェントが稼動するホスト名(もしくはIPアドレス)

引数に必要項目を記入しコマンドを実行してください。

wadm> enable-snmp –config=jse8-078 –description=jse8-078-SNMP-config –location=Japan –contact=Yoshio.Terada@Sun.COM –organization=SunMicrosystems –master-host=jse8-078

CLI201 コマンド ‘enable-snmp’ は正常に実行されました

wadm>

3. 設定の反映
構成をシステムに反映させるため、deploy-configコマンドを実行します。

wadm> deploy-config jse8-078

CLI201 コマンド ‘deploy-config’ は正常に実行されました

wadm>

4. 設定内容の確認

設定内容を確認します。

wadm> get-snmp-prop –config=jse8-078

contact=Yoshio.Terada@Sun.COM

enabled=true

description=jse8-078-SNMP-config

master-host=jse8-078

location=Japan

organization=SunMicrosystems

wadm>

5.サーバインスタンスの再起動
サーバインスタンスを再起動します。

# /sun/webserver7/https-jse8-077/bin/stopserv

server has been shutdown

# /sun/webserver7/https-jse8-077/bin/startserv

Sun Java System Web Server 7.0 B01/16/2007 10:16

info: HTTP3072: http-listener-1: http://jse8-077:80 ready to accept requests
….

info: CORE3274: successful server startup

6. OSのSNMPのプロセスの停止

OS側のSNMPの関連プロセスを全て停止します。

# cd /etc/init.d/

# ./init.dmi stop; ./init.snmpdx stop; ./init.sma stop

# ps -ef|grep snmp

←ここで、snmpに関連するプロセスが起動していないことを確認します。

# netstat -an|grep 161

←ここで、161番ポートが使用されていないかを確認します。

7. 残骸ファイルの削除

ログディレクトリ配下に”pid.masteragt”フィルが存在している場合、
過去の残骸ですので、ファイルを削除します。
(初めて起動する場合は、残骸ファイルはありません。)

# ls

access errors pid.masteragt pid.httpagt log.httpagt

# rm pid.masteragt pid.httpagt log.httpagt

# ls

access errors

8. Solaris 10のみ下記を実行

Solaris 10にSun Java System Web Server 7をインストールされている方で
SNMPの設定を行う方は下記のコマンドを実行してください。
必要であれば起動スクリプト中に下記のコマンドを記述してください。
(2007年03月26日 現在)

# ndd -set /dev/tcp tcp_xmit_hiwat 262144

上記コマンドを実行しない状態でマスターエージェントを起動させようとすると
マスターエージェントが正常に起動しません。この問題はSolaris 8 ,
Solaris 9では発生せず、Solaris 10でのみ発生します。
現在、調査中ですが回避策として上記コマンドを実行してください。

tcp_xmit_hiwatはカーネルパラメータの一つで、ネットワークの接続時における
送信ウインドウの最大サイズを設定します。デフォルトは49152です。
このパラメータを変更することによるシステムに対する影響
(パフォーマンスの劣化等)は軽微と考えますが、本番環境の場合、
十分にテストを行った後、御適用ください。

9. SNMPマスターエージェントの起動
マスターエージェントを起動します。

wadm> start-snmp-master-agent –snmp-port=161 jse8-078

CLI208 SNMP マスターエージェントは正常に起動しました

wadm>

10. SNMPサブエージェントの起動
サブエージェントを起動します。

wadm> start-snmp-subagent jse8-078

CLI210 SNMP サブエージェントは正常に起動しました

wadm>

11. SNMPの稼動確認

snmpwalkコマンドを実行し情報が取得できるか確認します。
snmpwalkコマンドを実行すると下記のような結果が得られると思います。
以上でsnmpの設定は完了です。容易に設定ができたかと思います。

# /usr/sfw/bin/snmpwalk -c public -v 1 localhost:161 .1.3.6.1.4.1.42.2.190.1

SNMPv2-SMI::enterprises.42.2.190.1.1.1.2.1 = STRING: “https-jse8-078”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.3.1 = STRING: “Sun Java System Web Server 7.0 B12/04/2006 10:15 (SunOS DOMESTIC)”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.4.1 = STRING: “jse8-078-SNMP-config”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.5.1 = STRING: “SunMicrosystems”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.6.1 = STRING: “Yoshio.Terada@Sun.COM”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.7.1 = STRING: “Japan”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.8.1 = INTEGER: 1

SNMPv2-SMI::enterprises.42.2.190.1.1.1.9.1 = Timeticks: (23749300) 2 days, 17:58:13.00

SNMPv2-SMI::enterprises.42.2.190.1.1.1.10.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.11.1 = Counter64: 39

SNMPv2-SMI::enterprises.42.2.190.1.1.1.12.1 = Counter64: 19257

SNMPv2-SMI::enterprises.42.2.190.1.1.1.13.1 = Counter64: 142851

SNMPv2-SMI::enterprises.42.2.190.1.1.1.14.1 = Counter64: 26

SNMPv2-SMI::enterprises.42.2.190.1.1.1.15.1 = Counter64: 13

SNMPv2-SMI::enterprises.42.2.190.1.1.1.16.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.17.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.18.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.19.1 = Counter64: 26

SNMPv2-SMI::enterprises.42.2.190.1.1.1.20.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.21.1 = Counter64: 13

SNMPv2-SMI::enterprises.42.2.190.1.1.1.22.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.23.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.24.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.25.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.26.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.1.1.27.1 = STRING: “0.0703125”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.28.1 = STRING: “0.125”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.29.1 = STRING: “0.109375”

SNMPv2-SMI::enterprises.42.2.190.1.1.1.30.1 = Counter64: 9886

SNMPv2-SMI::enterprises.42.2.190.1.1.1.31.1 = Counter64: 1563

SNMPv2-SMI::enterprises.42.2.190.1.2.1.2.1.1 = INTEGER: 2442

SNMPv2-SMI::enterprises.42.2.190.1.2.1.3.1.1 = Gauge32: 16

SNMPv2-SMI::enterprises.42.2.190.1.2.1.4.1.1 = Gauge32: 16

SNMPv2-SMI::enterprises.42.2.190.1.2.1.5.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.2.1.6.1.1 = Counter32: 1

SNMPv2-SMI::enterprises.42.2.190.1.2.1.7.1.1 = Gauge32: 1352

SNMPv2-SMI::enterprises.42.2.190.1.2.1.8.1.1 = Counter64: 14

SNMPv2-SMI::enterprises.42.2.190.1.2.1.9.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.2.1.10.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.2.1.11.1.1 = Gauge32: 200

SNMPv2-SMI::enterprises.42.2.190.1.2.1.12.1.1 = Counter64: 291920

SNMPv2-SMI::enterprises.42.2.190.1.2.1.13.1.1 = Counter64: 114312

SNMPv2-SMI::enterprises.42.2.190.1.2.1.14.1.1 = STRING: “0.3672”

SNMPv2-SMI::enterprises.42.2.190.1.3.1.2.1.1.1 = STRING: “http-listener-1”

SNMPv2-SMI::enterprises.42.2.190.1.3.1.3.1.1.1 = INTEGER: 1

SNMPv2-SMI::enterprises.42.2.190.1.3.1.4.1.1.1 = STRING: “0.0.0.0”

SNMPv2-SMI::enterprises.42.2.190.1.3.1.5.1.1.1 = INTEGER: 80

SNMPv2-SMI::enterprises.42.2.190.1.3.1.6.1.1.1 = INTEGER: 0

SNMPv2-SMI::enterprises.42.2.190.1.4.1.2.1.1.1 = STRING: “NativePool”

SNMPv2-SMI::enterprises.42.2.190.1.4.1.3.1.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.4.1.4.1.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.4.1.5.1.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.6.1.1.1.1 = STRING: “Java HotSpot(TM) Server VM”

SNMPv2-SMI::enterprises.42.2.190.1.6.1.2.1.1 = STRING: “Sun Microsystems Inc.”

SNMPv2-SMI::enterprises.42.2.190.1.6.1.3.1.1 = STRING: “1.5.0_09-b03”

SNMPv2-SMI::enterprises.42.2.190.1.6.1.4.1.1 = Gauge32: 2051

SNMPv2-SMI::enterprises.42.2.190.1.6.1.5.1.1 = Counter64: 2051

SNMPv2-SMI::enterprises.42.2.190.1.6.1.6.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.6.1.7.1.1 = Counter64: 39912936

SNMPv2-SMI::enterprises.42.2.190.1.6.1.8.1.1 = Counter32: 10

SNMPv2-SMI::enterprises.42.2.190.1.6.1.9.1.1 = Counter64: 12

SNMPv2-SMI::enterprises.42.2.190.1.6.1.10.1.1 = Gauge32: 9

SNMPv2-SMI::enterprises.42.2.190.1.6.1.11.1.1 = Counter64: 71

SNMPv2-SMI::enterprises.42.2.190.1.6.1.12.1.1 = Counter64: 385

SNMPv2-SMI::enterprises.42.2.190.1.7.1.2.1.1 = STRING: “jse8-078”

SNMPv2-SMI::enterprises.42.2.190.1.7.1.3.1.1 = Counter64: 39

SNMPv2-SMI::enterprises.42.2.190.1.7.1.4.1.1 = Counter64: 19257

SNMPv2-SMI::enterprises.42.2.190.1.7.1.5.1.1 = Counter64: 142851

SNMPv2-SMI::enterprises.42.2.190.1.7.1.6.1.1 = Counter64: 26

SNMPv2-SMI::enterprises.42.2.190.1.7.1.7.1.1 = Counter64: 13

SNMPv2-SMI::enterprises.42.2.190.1.7.1.8.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.9.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.10.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.11.1.1 = Counter64: 26

SNMPv2-SMI::enterprises.42.2.190.1.7.1.12.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.13.1.1 = Counter64: 13

SNMPv2-SMI::enterprises.42.2.190.1.7.1.14.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.15.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.16.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.17.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.7.1.18.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.2.1.1.1 = STRING: “//jse8-078/”

SNMPv2-SMI::enterprises.42.2.190.1.8.1.3.1.1.1 = INTEGER: 1

SNMPv2-SMI::enterprises.42.2.190.1.8.1.4.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.5.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.6.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.7.1.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.8.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.9.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.10.1.1.1 = Counter32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.11.1.1.1 = Gauge32: 0

SNMPv2-SMI::enterprises.42.2.190.1.8.1.12.1.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.2.1.1.1.1 = STRING: “invoker”

SNMPv2-SMI::enterprises.42.2.190.1.10.1.2.1.1.1.2 = STRING: “jsp”

SNMPv2-SMI::enterprises.42.2.190.1.10.1.2.1.1.1.3 = STRING: “default”

SNMPv2-SMI::enterprises.42.2.190.1.10.1.3.1.1.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.3.1.1.1.2 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.3.1.1.1.3 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.4.1.1.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.4.1.1.1.2 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.4.1.1.1.3 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.5.1.1.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.5.1.1.1.2 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.5.1.1.1.3 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.6.1.1.1.1 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.6.1.1.1.2 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.10.1.6.1.1.1.3 = Counter64: 0

SNMPv2-SMI::enterprises.42.2.190.1.14.1.2.1.1 = STRING: “1”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.2.1.2 = STRING: “2”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.3.1.1 = STRING: “91.913215”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.3.1.2 = STRING: “91.321499”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.4.1.1 = STRING: “5.917160”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.4.1.2 = STRING: “6.903353”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.5.1.1 = STRING: “2.169625”

SNMPv2-SMI::enterprises.42.2.190.1.14.1.5.1.2 = STRING: “1.775148”

ちなみに MIB と照らし合わせた各取得項目の意味は下記の通りです。

wsInstanceIndex 1.3.6.1.4.1.42.2.190.1.1.1.1 “Web Server instance index”
wsInstanceId 1.3.6.1.4.1.42.2.190.1.1.1.2 “Web Server instance identifier. Examples: https-test, https-config1.”
wsInstanceVersion 1.3.6.1.4.1.42.2.190.1.1.1.3 “Web Server instance software version. Example: Sun Java System Web Server 7.0 B10/10/2005 12:57 (SunOS DOMESTIC)”
wsInstanceDescription 1.3.6.1.4.1.42.2.190.1.1.1.4 “Description of server instance”
wsInstanceOrganization 1.3.6.1.4.1.42.2.190.1.1.1.5 “Organization responsible for server instance”
wsInstanceContact 1.3.6.1.4.1.42.2.190.1.1.1.6 “Contact information for person(s) responsible for server instance”
wsInstanceLocation 1.3.6.1.4.1.42.2.190.1.1.1.7 “Location of server instance”
wsInstanceStatus 1.3.6.1.4.1.42.2.190.1.1.1.8 “Web Server instance status”
wsInstanceUptime 1.3.6.1.4.1.42.2.190.1.1.1.9 “Web Server instance uptime”
wsInstanceDeathCount 1.3.6.1.4.1.42.2.190.1.1.1.10 “Number of times server instance processes have died”
wsInstanceRequests 1.3.6.1.4.1.42.2.190.1.1.1.11 “Number of requests processed”
wsInstanceInOctets 1.3.6.1.4.1.42.2.190.1.1.1.12 “Number of octets received”
wsInstanceOutOctets 1.3.6.1.4.1.42.2.190.1.1.1.13 “Number of octets transmitted”
wsInstanceCount2xx 1.3.6.1.4.1.42.2.190.1.1.1.14 “Number of 200-level (Successful) responses issued”
wsInstanceCount3xx 1.3.6.1.4.1.42.2.190.1.1.1.15 “Number of 300-level (Redirection) responses issued”
wsInstanceCount4xx 1.3.6.1.4.1.42.2.190.1.1.1.16 “Number of 400-level (Client Error) responses issued”
wsInstanceCount5xx 1.3.6.1.4.1.42.2.190.1.1.1.17 “Number of 500-level (Server Error) responses issued”
wsInstanceCountOther 1.3.6.1.4.1.42.2.190.1.1.1.18 “Number of other (neither 2xx, 3xx, 4xx, nor 5xx) responses issued”
wsInstanceCount200 1.3.6.1.4.1.42.2.190.1.1.1.19 “Number of 200 (OK) responses issued”
wsInstanceCount302 1.3.6.1.4.1.42.2.190.1.1.1.20 “Number of 302 (Moved Temporarily) responses issued”
wsInstanceCount304 1.3.6.1.4.1.42.2.190.1.1.1.21 “Number of 304 (Not Modified) responses issued”
wsInstanceCount400 1.3.6.1.4.1.42.2.190.1.1.1.22 “Number of 400 (Bad Request) responses issued”
wsInstanceCount401 1.3.6.1.4.1.42.2.190.1.1.1.23 “Number of 401 (Unauthorized) responses issued”
wsInstanceCount403 1.3.6.1.4.1.42.2.190.1.1.1.24 “Number of 403 (Forbidden) responses issued”
wsInstanceCount404 1.3.6.1.4.1.42.2.190.1.1.1.25 “Number of 404 (Not Found) responses issued”
wsInstanceCount503 1.3.6.1.4.1.42.2.190.1.1.1.26 “Number of 503 (Unavailable) responses issued”
wsInstanceLoad1MinuteAverage 1.3.6.1.4.1.42.2.190.1.1.1.27 “System load average for 1 minute. Example: 0.3984375”
wsInstanceLoad5MinuteAverage 1.3.6.1.4.1.42.2.190.1.1.1.28 “System load average for 5 minutes. Example: 0.3984375”
wsInstanceLoad15MinuteAverage 1.3.6.1.4.1.42.2.190.1.1.1.29 “System load average for 15 minutes. Example: 0.3984375”
wsInstanceNetworkInOctets 1.3.6.1.4.1.42.2.190.1.1.1.30 “Number of octets transmitted on the network per second”
wsInstanceNetworkOutOctets 1.3.6.1.4.1.42.2.190.1.1.1.31 “Number of octets received on the network per second”
wsProcessIndex 1.3.6.1.4.1.42.2.190.1.2.1.1 “Web Server processes”
wsProcessId 1.3.6.1.4.1.42.2.190.1.2.1.2 “Operating system process identifier”
wsProcessThreadCount 1.3.6.1.4.1.42.2.190.1.2.1.3 “Number of request processing threads currently available”
wsProcessThreadIdle 1.3.6.1.4.1.42.2.190.1.2.1.4 “Number of request processing threads currently idle”
wsProcessConnectionQueueCount 1.3.6.1.4.1.42.2.190.1.2.1.5 “Number of connections currently in connection queue”
wsProcessConnectionQueuePeak 1.3.6.1.4.1.42.2.190.1.2.1.6 “Largest number of connections that have been queued simultaneously”
wsProcessConnectionQueueMax 1.3.6.1.4.1.42.2.190.1.2.1.7 “Maximum number of connections allowed in connection queue”
wsProcessConnectionQueueTotal 1.3.6.1.4.1.42.2.190.1.2.1.8 “Total number of connections that have been accepted”
wsProcessConnectionQueueOverflows 1.3.6.1.4.1.42.2.190.1.2.1.9 “Number of connections rejected due to connection queue overflow”
wsProcessKeepaliveCount 1.3.6.1.4.1.42.2.190.1.2.1.10 “Number of connections currently in keepalive queue”
wsProcessKeepaliveMax 1.3.6.1.4.1.42.2.190.1.2.1.11 “Maximum number of connections allowed in keepalive queue”
wsProcessSizeVirtual 1.3.6.1.4.1.42.2.190.1.2.1.12 “Process size in kbytes”
wsProcessSizeResident 1.3.6.1.4.1.42.2.190.1.2.1.13 “Process resident size in kbytes”
wsProcessFractionSystemMemoryUsage 1.3.6.1.4.1.42.2.190.1.2.1.14 “Fraction of process memory in system memory. Example: 0.10022”
wsListenerIndex 1.3.6.1.4.1.42.2.190.1.3.1.1 “HTTP Listener index”
wsListenerId 1.3.6.1.4.1.42.2.190.1.3.1.2 “HTTP Listener identifier. Examples: http-listener-1, port-80”
wsListenerAddressType 1.3.6.1.4.1.42.2.190.1.3.1.3 Indicates the InetAddressType of the wsListenerAddress object, as per RFC 4001″
wsListenerAddress 1.3.6.1.4.1.42.2.190.1.3.1.4 “Address the HTTP listener is listening on”
wsListenerPort 1.3.6.1.4.1.42.2.190.1.3.1.5 “Port the HTTP listener is listening on”
wsListenerSecurity 1.3.6.1.4.1.42.2.190.1.3.1.6 “Encryption support”
wsThreadPoolIndex 1.3.6.1.4.1.42.2.190.1.4.1.1 “Thread pool index”
wsThreadPoolId 1.3.6.1.4.1.42.2.190.1.4.1.2 “Thread pool identifier. Example: NativePool, java-threads
wsThreadPoolCount 1.3.6.1.4.1.42.2.190.1.4.1.3 “Number of requests queued”
wsThreadPoolPeak 1.3.6.1.4.1.42.2.190.1.4.1.4 “Largest number of requests that have been queued simultaneously”
wsThreadPoolMax 1.3.6.1.4.1.42.2.190.1.4.1.5 “Maximum number of requests allowed in queue”
wsJdbcResourceIndex 1.3.6.1.4.1.42.2.190.1.5.1.1 “JDBC resource index”
wsJdbcResourceJndiName 1.3.6.1.4.1.42.2.190.1.5.1.2 “JNDI Name of the JDBC resource. Example: PointbasePool”
wsJdbcConnectionsMax 1.3.6.1.4.1.42.2.190.1.5.1.3 “Maximum number of connections”
wsJdbcCountConnections 1.3.6.1.4.1.42.2.190.1.5.1.4 “Current number of connections in the pool”
wsJdbcConnectionsPeak 1.3.6.1.4.1.42.2.190.1.5.1.5 “Peak number of connections at any time”
wsJdbcTotalConnectionsLeased 1.3.6.1.4.1.42.2.190.1.5.1.6 “Total number of connection leases”
wsJdbcCountConnectionsFree 1.3.6.1.4.1.42.2.190.1.5.1.7 “Number of free connections in the pool”
wsJdbcCountConnectionsLeased 1.3.6.1.4.1.42.2.190.1.5.1.8 “Number of connections currently leased”
wsJdbcTotalConnectionsFailedValidation 1.3.6.1.4.1.42.2.190.1.5.1.9 “Total number of connections that have failed validation”
wsJdbcCountQueued 1.3.6.1.4.1.42.2.190.1.5.1.10 “Number of connection requests that are currently in the queue”
wsJdbcPeakQueued 1.3.6.1.4.1.42.2.190.1.5.1.11 “Highest number of connection requests that were in the queue”
wsJdbcWaitTimePeak 1.3.6.1.4.1.42.2.190.1.5.1.12 “The maximum time in milliseconds that any connection request has been in the wait queue”
wsJdbcWaitTimeAverage 1.3.6.1.4.1.42.2.190.1.5.1.13 “The average time in milliseconds that requests have been in the wait queue”
wsJdbcCountConnectionIdleTimeouts 1.3.6.1.4.1.42.2.190.1.5.1.14 “The total number of connections that have been closed due to idle timeout”
wsJdbcCountWaitQueueTimeouts 1.3.6.1.4.1.42.2.190.1.5.1.15 “The total number of connection requests that have timed out from the wait queue without getting a connection”
wsJvmName 1.3.6.1.4.1.42.2.190.1.6.1.1 “JVM identifier. Example: Java HotSpot(TM) Server VM”
wsJvmVendor 1.3.6.1.4.1.42.2.190.1.6.1.2 “Java Virtual Machine implementation vendor. Example: Sun Microsystems Inc.”
wsJvmVersion 1.3.6.1.4.1.42.2.190.1.6.1.3 “Java Virtual Machine implementation version. Example: 1.5.0_06-ea-b02”
wsJvmCountClassesLoaded 1.3.6.1.4.1.42.2.190.1.6.1.4 “Number of classes that are currently loaded in the Java Virtual Machine”
wsJvmTotalClassesLoaded 1.3.6.1.4.1.42.2.190.1.6.1.5 “Total number of classes that have been loaded since the Java Virtual Machine has started execution”
wsJvmTotalClassesUnloaded 1.3.6.1.4.1.42.2.190.1.6.1.6 “Total number of classes unloaded since the Java Virtual Machine has started execution”
wsJvmSizeHeap 1.3.6.1.4.1.42.2.190.1.6.1.7 “Heap memory used in bytes by the Java Virtual Machine”
wsJvmPeakThreads 1.3.6.1.4.1.42.2.190.1.6.1.8 “Peak live thread count since the Java Virtual Machine started or peak was reset”
wsJvmTotalThreadsStarted 1.3.6.1.4.1.42.2.190.1.6.1.9 “Total number of threads created and also started since the Java Virtual Machine started”
wsJvmCountThreads 1.3.6.1.4.1.42.2.190.1.6.1.10 “Current number of live threads including both daemon and non-daemon threads”
wsJvmCountGarbageCollections 1.3.6.1.4.1.42.2.190.1.6.1.11 “Total number of garbage collections that have occurred”
wsJvmGarbageCollectionTime 1.3.6.1.4.1.42.2.190.1.6.1.12 “Approximate accumulated garbage collection elapsed time in milliseconds”
wsVsIndex 1.3.6.1.4.1.42.2.190.1.7.1.1 “Virtual server index”
wsVsId 1.3.6.1.4.1.42.2.190.1.7.1.2 “Virtual server identifier. Examples: http://www.charity.org, my-vsid”
wsVsRequests 1.3.6.1.4.1.42.2.190.1.7.1.3 “Number of requests processed”
wsVsInOctets 1.3.6.1.4.1.42.2.190.1.7.1.4 “Number of octets received”
wsVsOutOctets 1.3.6.1.4.1.42.2.190.1.7.1.5 “Number of octets transmitted”
wsVsCount2xx 1.3.6.1.4.1.42.2.190.1.7.1.6 “Number of 200-level (Successful) responses issued”
wsVsCount3xx 1.3.6.1.4.1.42.2.190.1.7.1.7 “Number of 300-level (Redirection) responses issued”
wsVsCount4xx 1.3.6.1.4.1.42.2.190.1.7.1.8 “Number of 400-level (Client Error) responses issued”
wsVsCount5xx 1.3.6.1.4.1.42.2.190.1.7.1.9 “Number of 500-level (Server Error) responses issued”
wsVsCountOther 1.3.6.1.4.1.42.2.190.1.7.1.10 “Number of other (neither 2xx, 3xx, 4xx, nor 5xx) responses issued”
wsVsCount200 1.3.6.1.4.1.42.2.190.1.7.1.11 “Number of 200 (OK) responses issued”
wsVsCount302 1.3.6.1.4.1.42.2.190.1.7.1.12 “Number of 302 (Moved Temporarily) responses issued”
wsVsCount304 1.3.6.1.4.1.42.2.190.1.7.1.13 “Number of 304 (Not Modified) responses issued”
wsVsCount400 1.3.6.1.4.1.42.2.190.1.7.1.14 “Number of 400 (Bad Request) responses issued”
wsVsCount401 1.3.6.1.4.1.42.2.190.1.7.1.15 “Number of 401 (Unauthorized) responses issued”
wsVsCount403 1.3.6.1.4.1.42.2.190.1.7.1.16 “Number of 403 (Forbidden) responses issued”
wsVsCount404 1.3.6.1.4.1.42.2.190.1.7.1.17 “Number of 404 (Not Found) responses issued”
wsVsCount503 1.3.6.1.4.1.42.2.190.1.7.1.18 “Number of 503 (Unavailable) responses issued”
wsWebAppIndex 1.3.6.1.4.1.42.2.190.1.8.1.1 “Web application index”
wsWebAppUri 1.3.6.1.4.1.42.2.190.1.8.1.2 “URI at which the web application is deployed”
wsWebAppMode 1.3.6.1.4.1.42.2.190.1.8.1.3 “State of the web application”
wsWebAppCountJsps 1.3.6.1.4.1.42.2.190.1.8.1.4 “Number of JSPs loaded”
wsWebAppCountReloadedJsps 1.3.6.1.4.1.42.2.190.1.8.1.5 “Number of JSPs reloaded”
wsWebAppCountSessions 1.3.6.1.4.1.42.2.190.1.8.1.6 “Total number of sessions serviced by this web application”
wsWebAppCountActiveSessions 1.3.6.1.4.1.42.2.190.1.8.1.7 “Number of active sessions at the time the statistics were gathered”
wsWebAppPeakActiveSessions 1.3.6.1.4.1.42.2.190.1.8.1.8 “Peak number of active sessions since the web application was loaded”
wsWebAppCountRejectedSessions 1.3.6.1.4.1.42.2.190.1.8.1.9 “Number of sessions rejected”
wsWebAppCountExpiredSessions 1.3.6.1.4.1.42.2.190.1.8.1.10 “Total number of sessions that expired”
wsWebAppSessionAliveTimeMax 1.3.6.1.4.1.42.2.190.1.8.1.11 “Longest time in seconds that an expired session had been alive”
wsWebAppSessionAliveTimeAverage 1.3.6.1.4.1.42.2.190.1.8.1.12 “Average time in milliseconds that expired sessions had been alive”
wsServRespCacheEntriesMax 1.3.6.1.4.1.42.2.190.1.9.1.1 “Maximum possible number of entries”
wsServRespCacheThreshold 1.3.6.1.4.1.42.2.190.1.9.1.2 “When reached an overflow will occur”
wsServRespCacheTableSize 1.3.6.1.4.1.42.2.190.1.9.1.3 “Current Number of buckets”
wsServRespCacheCountEntries 1.3.6.1.4.1.42.2.190.1.9.1.4 “Current Number of Entries”
wsServRespCacheCountHits 1.3.6.1.4.1.42.2.190.1.9.1.5 “The number of cache hits”
wsServRespCacheCountMisses 1.3.6.1.4.1.42.2.190.1.9.1.6 “The number of cache misses”
wsServRespCacheCountEntriesRefreshed 1.3.6.1.4.1.42.2.190.1.9.1.7 “The number of values that have been refreshed (replaced with a new value in an existing extry)”
wsServRespCacheCountEntriesOverflowed 1.3.6.1.4.1.42.2.190.1.9.1.8 “The number of times that an overflow has occurred”
wsServRespCacheCountEntriesAdded 1.3.6.1.4.1.42.2.190.1.9.1.9 “The number of times new entries have been added”
wsServRespCacheCountEntriesRemoved 1.3.6.1.4.1.42.2.190.1.9.1.10 “The number of entries that have been trimmed”
wsServRespCacheSizeCurrent 1.3.6.1.4.1.42.2.190.1.9.1.11 “Current size of the cache in bytes”
wsServRespCacheSizeMax 1.3.6.1.4.1.42.2.190.1.9.1.12 “The upper bound on the cache size”
wsServletIndex 1.3.6.1.4.1.42.2.190.1.10.1.1 “Servlet index”
wsServletName 1.3.6.1.4.1.42.2.190.1.10.1.2 “Servlet name”
wsServletCountRequests 1.3.6.1.4.1.42.2.190.1.10.1.3 “Number of requests serviced by the servlet”
wsServletCountErrors 1.3.6.1.4.1.42.2.190.1.10.1.4 “Number of error that occured during request processing”
wsServletProcessingTime 1.3.6.1.4.1.42.2.190.1.10.1.5 “The total time in milliseconds spent in servicing requests”
wsServletPeakProcessingTime 1.3.6.1.4.1.42.2.190.1.10.1.6 “The peak processing time in milliseconds spent by any request”
wsSessReplCountSelfRecoveryAttempts 1.3.6.1.4.1.42.2.190.1.11.1.1 “The number of times session self recovery attempted”
wsSessReplCountSelfRecoveryFailures 1.3.6.1.4.1.42.2.190.1.11.1.2 “The number of times session self recovery failed”
wsSessReplCountFailoverAttempts 1.3.6.1.4.1.42.2.190.1.11.1.3 “Number of session failover attempts”
wsSessReplCountFailoverFailures 1.3.6.1.4.1.42.2.190.1.11.1.4 “Number of session failover failures”
wsSessReplMembers 1.3.6.1.4.1.42.2.190.1.11.1.5 “The ordered list(comma separated) of member instance-ids of the cluster.Example: <hostname@portno>,<hostname@portno>”
wsSessReplCurrentBackupInstanceId 1.3.6.1.4.1.42.2.190.1.11.1.6 “Instance-id of the current backup instance. Example: <hostname@portno>”
wsSessReplState 1.3.6.1.4.1.42.2.190.1.11.1.7 “Current state of the subsytem”
wsSessReplCountBkupConnFailures 1.3.6.1.4.1.42.2.190.1.11.1.8 “The number of times connection to the backup instance failed”
wsSessReplCountBkupConnFailoverSuccess 1.3.6.1.4.1.42.2.190.1.11.1.9 “The number of times backup connection was established successfully after a failover”
wsSessReplCountPutsSent 1.3.6.1.4.1.42.2.190.1.11.1.10 “The number of times a put request was sent to a remote instance”
wsSessReplCountGetsSent 1.3.6.1.4.1.42.2.190.1.11.1.11 “The number of times a get request was sent to a remote instance”
wsSessReplCountRemovesSent 1.3.6.1.4.1.42.2.190.1.11.1.12 “The number of times a remove request was sent to a remote instance”
wsSessReplCountPutsReceived 1.3.6.1.4.1.42.2.190.1.11.1.13 “The number of times a put request was received from a remote instance”
wsSessReplCountGetsReceived 1.3.6.1.4.1.42.2.190.1.11.1.14 “The number of times a get request was received from a remote instance”
wsSessReplCountRemovesReceived 1.3.6.1.4.1.42.2.190.1.11.1.15 “The number of times a remove request was received from a remote instance”
wsSessReplCountAsyncQueueEntries 1.3.6.1.4.1.42.2.190.1.11.1.16 “The current number of entries in async queue”
wsSessReplCountAsyncQueuePeakEntries 1.3.6.1.4.1.42.2.190.1.11.1.17 “Peak number of entries in async queue”
wsSessReplCountLockFailures 1.3.6.1.4.1.42.2.190.1.11.1.18 “The number of failed attempts to acquire the background session lock”
wsInstSessStoreIndex 1.3.6.1.4.1.42.2.190.1.12.1.1 “Instance session store index”
wsInstSessStoreInstanceId 1.3.6.1.4.1.42.2.190.1.12.1.2 “Instance ID of the session store
wsWebAppSessStoreIndex 1.3.6.1.4.1.42.2.190.1.13.1.1 “Session store index”
wsWebAppSessStoreVsId 1.3.6.1.4.1.42.2.190.1.13.1.2 “The name of the virtual server on which the web application is deployed”
wsWebAppSessStoreUri 1.3.6.1.4.1.42.2.190.1.13.1.3 “The context URI at which the web application is deployed”
wsWebAppSessStoreCountSessions 1.3.6.1.4.1.42.2.190.1.13.1.4 “Current number of entries in this store”
wsCpuIndex 1.3.6.1.4.1.42.2.190.1.14.1.1 “CPU index”
wsCpuId 1.3.6.1.4.1.42.2.190.1.14.1.2 “CPU identifier”
wsCpuIdleTime 1.3.6.1.4.1.42.2.190.1.14.1.3 “Percentage of the time that the CPU is idle. Example: 98.616601”
wsCpuUserTime 1.3.6.1.4.1.42.2.190.1.14.1.4 “Percentage of the time the CPU is spending in user space. Example: 0.790514”
wsCpuKernelTime 1.3.6.1.4.1.42.2.190.1.14.1.5 “Percentage of the time the CPU is spending in kernel space. Example: 0.592885”
wsInstanceStatusChange 1.3.6.1.4.1.42.2.190.1.15.0.1 “A wsInstanceStatusChange trap signifies that wsInstanceStatus has changed”

如何でしょう、情報が取得できたことが確認できたでしょうか。

2007年3月25日 at 8:58 午後

WS7でPHPを動かす方法



さて、本日はPHPをWeb Server7上で動作させる方法を紹介します。



既に、海外のサイトでもPHPを動作させる方法について紹介されていますが、

日本語ではまだ情報が公開されていません。

そこで、日本語で情報を紹介することを目的として、日本語で説明します。

Sriram Natarajan’s Weblog



事前準備



PHPの設定を行う前に、下記を事前に準備しておいていただく必要があります。



1. Sun Java System Web Server 7.0 をインストール済みである。



2. Sun Java System Web Server 7.0 PHP Add-On 1.0を入手済みである。



もし、まだ入手されていない場合、下記のURLより入手してください。

[Sun Java System Web Server 7.0]

Sun Java System Web Server 7.0 Download

[Sun Java System Web Server 7.0 PHP Add-On 1.0]

Sun Java System Web Server 7.0 PHP Add-On 1.0 Download





前提事項:



今回、Sun Java System Web Server 7.0を

jse8-078.Japan.Sun.COMというマシンにインストールします。

Web Server 7.0がインストールされている場所を[/sun/webserver7/]とします。





PHPの設定



1. PHPアドオンパッケージの展開



入手したPHPのアドオンパッケージを展開します。今回ダウンロードした

ファイルを/usr/tmpディレクトリにおいてあります。



# unzip phppack-5_2_0-solaris-sparcv9.zip

……(省略)

# ls php

64 libpcre.so.0 php.ini-dist

License libpcre.so.0.0.1 php.ini-recommended

README libphp5.so setupPHP

bin libxml2.so setupPHP.pl

include libxml2.so.2 sparcv9

lib libxml2.so.2.6.27

libpcre.so man




2. PHPパッケージの移動



展開したPHPの関連ファイルを全てWeb Server 7.0のプラグインディレクトリ

配下に移動させます。




# mv php /sun/webserver7/plugins/
# cd /sun/webserver7/plugins/


3. インスタンスに対するPHPの設定



PHPの設定は起動するHTTPのインスタンス毎に行うようになっているため、

PHPを稼動させるインスタンスを指定して設定コマンドを実行します。




# ./setupPHP -instancename=https-jse8-078



UPDATED: /sun/webserver7/https-jse8-078/config/magnus.conf

UPDATED: /sun/webserver7/https-jse8-078/config/obj.conf

UPDATED: /sun/webserver7/https-jse8-078/config/mime.types



Setup was sucessful.

——————–



The following steps are necessary to make the changes to all the nodes.



(1) Start the admin server



/sun/webserver7/admin-server/bin/startserv



(2) Connect to the admin server using wadm command



/sun/webserver7/bin/wadm [–user=admin-user] [–password-file=admin-pswd-file] [–host=admin-host] [–port=admin-port]



(3) Pull the modified config from the node to config store

using the following command in wadm console:



pull-config –config=jse8-078 nodehost



For Example: If the host name for the node is xyz.com then enter the command like,



pull-config –config=jse8-078 xyz.com



(4) Deploy the new changes to all nodes using

the following command in wadm console:



deploy-config jse8-078






4. 設定を反映させる為、手動設定が必要



PHPのインスタンスに対する設定を行った後、手動で4コマンドを実行するように

支持されています。そこで、支持に従い各コマンドをそれぞれ実行します。


# /sun/webserver7/admin-server/bin/startserv

Sun Java System Web Server 7.0 B12/04/2006 10:15

info: CORE3016: daemon is running as super-user

info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_09] from [Sun Microsystems Inc.]

info: WEB0100: Loading web module in virtual server [admin-server] at [/admingui]

info: WEB0100: Loading web module in virtual server [admin-server] at [/jmxconnector]

info: HTTP3072: admin-ssl-port: https://jse8-078:8989 ready to accept requests

info: CORE3274: successful server startup

# /sun/webserver7/bin/wadm –user=admin

admin-user-password を入力してください> [パスワード]

Sun Java System Web Server 7.0 B12/04/2006 10:15

wadm> pull-config –config=jse8-078 jse8-078

CLI201 コマンド ‘pull-config’ は正常に実行されました

wadm> deploy-config jse8-078

jse8-078: ADMIN3594: 構成の変更にはサーバーの再起動が必要です。




5. インスタンスの再起動



設定が完了後、インスタンスを起動します。




wadm> stop-instance –config=jse8-078 jse8-078

CLI205 サーバーインスタンスは正常に停止しました。

wadm> start-instance –config=jse8-078 jse8-078

CLI204 サーバーインスタンスは正常に起動しました。

wadm>




6. 動作確認 1



上記でPHPを動作させるための設定が完了です。

実際にPHPのプログラムが動作するかを確認します。



Web Server 7.0のインスタンスのドキュメントルート上

[/sun/webserver7/https-jse8-078/docs]

拡張子.phpを含むファイルを作成します。



例1:

index.php


<?php

echo phpinfo();

?>




その後、http://HOST-NAME/index.phpにアクセスしてみます。

すると下記のような、PHPの情報が出力されます。






例2:

helloworld.php お決まりのハローワールド!!


<html>

<body>

<?php

$myvar = “こんにちは”;

echo $myvar;

?>

</body>

</html>




そして、http://HOST-NAME/helloworld.phpにアクセスしてみます。

すると下記のページが表示されます。






以上で、Sun Java System Web Server 7.0でも簡単にPHPを動作させることが

できる事がわかりました!!

これはFast CGIのプラグインを利用しているため動作も軽快で、上記の通り

設定が非常に簡単です。



是非、Sun Java System Web Server 7.0でPHPを動作させてみてください。


2007年3月23日 at 2:42 午前


Java Champion & Evangelist

Translate

ご注意

このエントリは個人の見解であり、所属する会社の公式見解ではありません

カレンダー

2007年3月
 1234
567891011
12131415161718
19202122232425
262728293031  

カテゴリー

clustermap

ブログ統計情報

  • 1,288,503 hits

Feeds

アーカイブ