« Teamwork 3.2.0 | メイン | 社会に出るシリーズ »

activeCollabをさくらインターネットにインストールするメモ

ActiveCollab

activeCollabは、PHP5+MySQL(InnoDB)の環境が必要だと言うことで、さくらインターネット(スタンダードプラン)の標準環境(PHP5+MySQL(MyISAM))ではダメらしい。
この時点でモチベーションがかなり低下したが、本家のFAQを参考に無理矢理インストールしてみた。

作業の流れ

1. PHP5 のインストール
2. activeCollab のインストール
3. Hackの適応(MyISAMに対応させる)

1. PHP 5 のインストール

まったくの初心者の方は参考サイトをご覧下さい。 → http://another.rocomotion.jp/11809565202793.html

■PHP 5 をダウンロード
 PHP 5.2.3 (tar.gz) [9,123Kb] - 01 June 2007
 → http://www.php.net/downloads.php

■コンパイル&インストール
 configureは上記参考サイト様で提供されているシェルスクリプトを利用させて頂きました。
 → http://www.rocomotion.jp/myphp/pplogp/file/ex/1-ug-conf.zip

config

%sh conf.sh
loading cache ./config.cache
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for egrep... (cached) grep -E
checking for a sed that does not truncate output... (cached) /usr/bin/sed

.
.

+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+

Thank you for using PHP.

%

環境変数 PHP_PEAR_CACHE_DIR の設定

%setenv PHP_PEAR_CACHE_DIR ~/php5/pear/cache

make

%make

install

%make install

CGIのコピー
インストールで作成されたPHP5のプログラム本体を適当なディレクトリにコピーします。
デフォルトであれば /home/hogehoge/www/cgi-bin の中。 ※hogehogeはユーザーID。
ディレクトリがない場合は先に作成しておく。

%mkdir /home/hogehoge/www/cgi-bin

%cp ~/bin/php-cgi5 ~/www/cgi-bin/php5.cgi
 ※コピー元は /bin/php5 ではないので注意。

.htaccessを設置
/home/hogehoge/www に .htaccess を設置し 拡張子が .php5のファイルをPHP5で動かすように設定します。

Action php5-script /cgi-bin/php5.cgi
AddHandler php5-script .php5

※すべてのPHPをバージョン5で動かす場合は .php5 → .php とする。

ひとまずこれで、PHP5のインストールが完了。


2. activeCollab のインストール

ダウンロード&展開
本家サイトから activeCollab 0.7.1 をダウンロードしてサーバーに展開。
http://www.activecollab.com/

■ .htaccessを設置
PHP5で動かすために展開したディレクトリの中に.htaccessを設置します。

AddHandler php5-script .php


3. Hack の適用

本家のFAQにある方法に従ってソースを修正します。
http://www.activecollab.com/forums/topic/1302/

1- Open, in your favorite text ed, the mysql_schema.php file located in /public/install/installation/templates/sql/
2- Search & Replace all the 'innodb' occurences by 'myisam' & save
3- Open the acInstallation.class.php file located in /public/install/installation/
4- Search & Replace all the 'innodb' occurences by 'myisam'
5- On line 213, delete 'myisam' in the 'have_myisam' variable statement,
6- On line 218, change 'return false' to 'return true' and save
7- Upload both files to their respective locations on your server if you have already uploaded all the
ActiveCollab files, or the whole package otherwise.
8- Go through the install process.

■ mysql_schema.php
ActiveCollab をインストールしたディレクトリの中の /public/install/installation/templates/sql/ 以下にある mysql_schema.php をエディタで開き、innodb と記述されている箇所を myisam にすべて置き換えます。

■ acInstallation.class.php
ActiveCollab をインストールしたディレクトリの中の /public/install/installation/ 以下にある acInstallation.class.php をエディタで開き、213、218行目を変更します。

acInstallation.class.php
・213行目 have_innodb → have_myisam に変更

if($result = mysql_query("SHOW VARIABLES LIKE 'have_myisam'", $this->database_connection)) {

・218行目 false → true に変更
return true;


これで、動くはずです。


トラックバック

このエントリーのトラックバックURL:
http://mt3.digibee.jp/mt-tb.cgi/62