金曜日 10 02, 2009
金曜日 10 02, 2009
仕事で Selenium を調べていて、その中の 1 プロジェクト Bromine を評価しています。Selenium のテストをアップロード、保管したり、複数の OS/ブラウザの実行環境を登録しておいて、その中から複数指定してテストを走らせたり、結果のレポートを出してくれたり、ということがウェブの GUI を通じてできるので、結構いいかも、と今のところ思っています。で、これが PHP + MySQL のアプリで、インストールドキュメントをみると XAMPP を薦めていたりするのですが、ここはやっぱり
Sun GlassFish Web Stack に入れました。
Web Stack については 片貝さんのブログ に詳しく書いてあります。
以下はインストール時のメモ。もう完全に自分用。
Web Stack はネイティブパッケージ版と IPS 版があるが、IPS 版を使用。 OS は Solaris 10 5/09 x86。
bash-3.00# /opt/webstack1.5/bin/updatetool
:
# GUI で下記を追加。
# sun-apache22
# sun-mysql51
# sun-php52
# sun-php52-mysql
:
# ただ、mysql 入れるとき、事前にユーザを作っておく必要があった。インストールスクリプトで対処してない?
bash-3.00# mkdir /export/mysql
bash-3.00# groupadd mysql
bash-3.00# useradd -g mysql -d /export/mysql/ mysql
bash-3.00# chown -R mysql:mysql /export/mysql
# 起動確認。
bash-3.00# ./bin/sun-mysql51 start
bash-3.00# ./bin/sun-apache22 start
# 下記のようなエラー。my.cnf をホームにコピー必要。
bash-3.00$ ./bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/fake-webstack-root/var/run/mysql/mysql.sock' (2)
bash-3.00# cp etc/mysql/my.cnf /.my.cnf
bash-3.00# ./bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
# web サーバの設定を下記に従いおこなう。
http://wiki.openqa.org/display/BR/Setting+up+a+webserver+ready+for+Bromine
bash-3.00# vi etc/php/5.2/php.ini
# LoadModule は httpd.conf でなく以下のファイルに。
etc/apache2/2.2/conf.d/modules-32.load
etc/apache2/2.2/conf.d/modules-64.load
# あと、データベースも作っておく。
bash-3.00# ./bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.30-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database bromine;
Query OK, 1 row affected (0.00 sec)
# Bromine インストール
bash-3.00# pushd var/apache2/2.2/htdocs/
bash-3.00# unzip /home/so129345/tmp/bromine3b.zip
bash-3.00# mv bromine3b/* .
bash-3.00# mv bromine3b/.htaccess .
bash-3.00# rmdir bromine3b/
# apache リスタート
bash-3.00# ./bin/sun-apache22 stop; ./bin/sun-apache22 start
Stopping httpd
Starting httpd
# で、Bromine の設定に進もうとするといろいろ問題があるので、下記などを参照しつつがんばる。
# http://clearspace.openqa.org/message/68115
bash-3.00# chmod -R 777 var/apache2/2.2/htdocs/app/ var/apache2/2.2/htdocs/cake/
bash-3.00# vi etc/apache2/2.2/original/httpd.conf
AllowOverride All
Step 1: Database information
Host: localhost
Username: root
Password:
Database name: bromine
Step 2: Setting up database
Database successfully installed.
Please delete /install dir.
# と表示されるから、install をリネイム。
bash-3.00# cd var/apache2/2.2/htdocs/app/webroot
bash-3.00# mv install/ install.toberemoved
ところが continue クリックすると、
Error: InstallController could not be found
Error: Create the class InstallController below in file: app/controllers/install_controller.php
みたいのが出てくる。が、これは無視して最初に書いてあるとおりにログインする。
でインストールは完了。下記はテスト結果の画面の 1 つ。パイチャートいい感じ。