会議室予約システム構築:phpScheduleIt
phpScheduleItはオープンソースで配布されており、人気の高い会議室予約システム。
やりたいこと
IE等のWebブラウザから、会議室予約システムを提供可能とする。
http://192.168.0.10/phpscheduleit/
条件
使用OS | CentOS5.5 64bit |
アプリ | Apache+PHP+MySQL (CentOS付属) |
文字コード | utf-8 |
ファイル入手
- phpScheduleIt
http://www.php.brickhost.com/
- 今回は以下ファイルを入手
phpScheduleIt_1.2.12.zip
http://sourceforge.net/projects/phpscheduleit/files/
MySQLデータベース作成
(1)MySQLデータベース作成
【telnet】
- スーパーユーザでログイン
$ su パスワード:
- MySQLでログイン
# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
- 「phpScheduleIt」データベース作成
mysql> create database phpscheduleit ; Query OK, 1 row affected (0.02 sec)
- 「phpScheduleIt」ユーザ作成
mysql> grant all privileges on phpscheduleit.* to phpscheduleitusr@localhost identified by 'phpscheduleitpass' ; Query OK, 0 rows affected (0.00 sec)
- 終了
mysql> exit Bye #
- データベース接続に問題が無いか確認
# mysql -u phpscheduleitusr -pphpscheduleitpass phpscheduleit Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 224 Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit Bye #
インストール
(1)ファイル転送
【FTP】
ftp にて、ユーザエリア「/home/hogehoge」にphpScheduleIt_1.2.12.zipをアップ
(2)インストール
- パッケージがあるか確認
# ls -l -rw-r--r-- 1 hogehoge hogehoge 1009535 7月 26 16:23 phpScheduleIt_1.2.12.zip
- パッケージを解凍
# unzip phpScheduleIt_1.2.12.zip -d phpscheduleit Archive: phpScheduleIt_1.2.12.zip inflating: phpscheduleit/cmd/send_reminders.php inflating: phpscheduleit/config/cmdinit.php inflating: phpscheduleit/config/config.new.php :
- 確認
# ls -l -rw-r--r-- 1 hogehoge hogehoge 1009535 7月 26 16:23 phpScheduleIt_1.2.12.zip drwxr-xr-x 11 root root 4096 7月 26 16:24 phpscheduleit
(3)html直下にコピー
- ファイルコピー
# cp -R phpscheduleit/ /var/www/html/
- 確認
# ls -l /var/www/html/ drwxr-xr-x 11 root root 4096 7月 26 16:29 phpscheduleit
- 所有者変更
# chown -R apache:apache /var/www/html/phpscheduleit/
- 確認
# ls -l /var/www/html/ drwxr-xr-x 11 apache apache 4096 7月 26 16:29 phpscheduleit
設定
(1)phpScheduleIt config.php設定
- configファイルをnewからコピーして作成
# cp /var/www/html/phpscheduleit/config/config.new.php /var/www/html/phpscheduleit/config/config.php
- 確認
# ls -l /var/www/html/phpscheduleit/config/ -rw-r--r-- 1 root root 12451 7月 26 16:54 config.php
- 所有者変更
# chown apache:apache /var/www/html/phpscheduleit/config/config.php
- 確認
# ls -l /var/www/html/phpscheduleit/config/ -rw-r--r-- 1 apache apache 12451 7月 26 16:54 config.php
- config編集
# vi /var/www/html/phpscheduleit/config/config.php
- サーバアドレス修正
$conf['app']['weburi'] = 'http://localhost/phpscheduleit'; ↓ $conf['app']['weburi'] = 'http://192.168.0.10/phpscheduleit';
- 管理者メールアドレスを修正
$conf['app']['adminEmail'] = 'admin@email.com'; ↓ $conf['app']['adminEmail'] = 'hogehoge@hogehoge.com';
- 言語設定を日本語に設定
$conf['app']['defaultLanguage'] = 'en_US'; ↓ $conf['app']['defaultLanguage'] = 'ja';
- データベースユーザ名設定
$conf['db']['dbUser'] = 'schedule_user'; ↓ $conf['db']['dbUser'] = 'phpscheduleitusr';
- データベースパスワード設定
$conf['db']['dbPass'] = 'password'; ↓ $conf['db']['dbPass'] = 'phpscheduleitpass';
- データベース名設定
$conf['db']['dbName'] = 'phpscheduleit'; ↓ $conf['db']['dbName'] = 'phpscheduleit';
- 日本時間(GMT+9)設定
$conf['app']['timezone'] = 0; ↓ $conf['app']['timezone'] = 9;
- 24時間表示設定
$conf['app']['timeFormat'] = 12; ↓ $conf['app']['timeFormat'] = 24;
(2)phpScheduleIt動作確認
【Web】
以下URLにアクセス
http://192.168.0.10/phpscheduleit/install/index.php →phpScheduleIt 「データベースへログインしてください。」 画面が表示
(3)phpScheduleIt設定
- 「データベースへログインしてください。」画面設定
データベースの root ユーザー名を入力してください:phpscheduleitusr
データベースの root パスワードを入力してください:phpscheduleitpass
- 設定後「データベースにログイン」押下
「適切に接続されるように phpscheduleit」画面が表示
- 「テーブルを作成」ボタン押下
→正常完了を確認
★以下エラーは、事前にDBを作成している事が理由であるため今回手順では無視してOK
Creating database...Failed: DB Error: already exists
(4)後処理
【telnet】
- installディレクトリ削除
# rm -Rf /var/www/html/phpscheduleit/install/
- 終了
# exit exit $
★完了
遭遇したトラブル
「Everything is fine - you just ~」エラー発生
問題:
http://192.168.0.10/limesurvey/admin/admin.php にアクセスしても「Everything is fine - you just ~」になる。
原因:
/var/www/html/limesurvey/admin/install/ 削除漏れ
謝辞
テキスト作成に当たり、以下サイトを参考にさせて頂きました。ありがとうございます。
http://www.keiaiemu.com/wiki/wiki.cgi?page=phpscheduleit
http://www.moongift.jp/2007/03/3545/
http://www.ryuzee.com/contents/blog/oyyoyeyyyc/phpscheduleitaeueuieyioyoyyye