Database JUNKY

MySQL,MariaDBを中心としたブログです

pentaho community edition インストール(linux centos5.5)

前々から書くといっておきながら結局かかなかったpentahoのインストール方法について書こうかと思います。まずpentahoとは何?というところから説明いたしますと、僕もいまいち理解していないのですが、biツールのセットという認識でいいかと思います。内訳として、こETL、report,analyze,miningと、分析とレポートに必要なものはすべて入っている製品です。しかも、フリーです。(有償版もあります)これだけでも、他の商用製品では、数百万、数千万するものが、OSSで利用できるというのは、大変魅力的です。しかもある程度日本語化されております。

個人的にいれたいと思った動機は、データベースの加工とかSQLを駆使してexcelファイルに落としたりcsvに落としたりとか、数件程度の抽出であれば良いのですが、データを分析する人(アナリスト)色々な角度から分析したいので、日を重ねるごとに、抽出する条件や、集計する条件、ほしい項目などがどんどん変わっていくわけなのです、当然の流れといえば、当然の流れなのですが、そのたびに、SQLを見直したり、プログラムを作ったりしていては非効率なのでETLを入れようと思いました。というか、数年前から思ってはいて、実際なかなか着手できなかったので、今のいままで、おざなりになっているというのも確かなんですけど、実際pentahoをbiサーバをどのような使うまでは理解しきっていないのですが、何もしないよりはましなので、以下にインストール手順を記載していきたいと思います。

  1. jdkのセットアップ [shell] #  ./jdk-6u24-linux-x64-rpm.bin [/shell]
  2. pentahoのバイナリをダウンロード http://www.pentaho-partner.jp/ あたりから「ダウンロード」を選択し、Pentaho BI Server Community Editionをダウンロード
  3. ダウンロードしたファイル解凍 [shell] # tar zxvf biserver-ce-3.7.0-stable.tar.gz ### 任意のディレクトリに対象ディレクリを移動 # mv biserver-ce/ /usr/local/ [/shell]
  4. 解凍ファイルの確認 こんな感じになるはずです [shell] [root@sqwww03 biserver-ce]# ll 合計 56 drwxr-xr-x 8 root root 4096  2月 25 00:54 data drwxr-xr-x 2 root root 4096  2月 25 00:54 licenses drwxr-xr-x 8 root root 4096  2月 25 00:54 pentaho-solutions -rw-r--r-- 1 root root  889 12月  4 00:25 promptuser.js -rwxr-xr-x 1 root root  869 12月  4 00:25 promptuser.sh -rw-r--r-- 1 root root 3980 12月  4 00:25 set-pentaho-env.bat -rwxr-xr-x 1 root root 3573 12月  4 00:25 set-pentaho-env.sh -rw-r--r-- 1 root root  547 12月  4 00:25 start-pentaho-debug.bat -rwxr-xr-x 1 root root  912 12月  4 00:25 start-pentaho-debug.sh -rw-r--r-- 1 root root  477 12月  4 00:25 start-pentaho.bat -rwxr-xr-x 1 root root  842 12月  4 00:25 start-pentaho.sh -rw-r--r-- 1 root root  185 12月  4 00:25 stop-pentaho.bat -rwxr-xr-x 1 root root  576 12月  4 00:25 stop-pentaho.sh drwxr-xr-x 9 root root 4096  2月 25 00:54 tomcat [/shell]
  5. pentahoサーバの起動 [shell] ./start-pentaho.sh /usr/local/biserver-ce /usr/local/biserver-ce WARNING: Using java from path DEBUG: _PENTAHO_JAVA_HOME= DEBUG: _PENTAHO_JAVA=java -------------------------------------------------------------------------------------------- The Pentaho BI Platform now contains a version checker that will notify you when newer versions of the software are available. The version checker is enabled by default. For information on what the version checker does, why it is beneficial, and how it works see: http://wiki.pentaho.com/display/ServerDoc2x/Version+Checker Press Enter to continue, or type cancel or Ctrl-C to prevent the server from starting. You will only be prompted once with this question. -------------------------------------------------------------------------------------------- [OK]:OK [/shell]
  6. ブラウザで表示を確認 ログインできるのですが見事に日本語が文字化けします。この部分を解消します。 [shell] # cd /usr/local/biserver-ce/ # cd tomcat/webapps/pentaho/mantle/launch/ * 日本語用のファイルのあるのがわかるかと思います # ll 合計 44 drwxr-xr-x 2 root root  4096  2月 25 00:54 images -rw-r--r-- 1 root root 18443 12月  3 12:34 launch.jsp -rw-r--r-- 1 root root 18466 12月  3 12:34 launch_ja.jsp # mv launch.jsp launch.save # mv launch_ja.jsp launch.jsp [/shell]
  7. スタートファイルに、utf-8のオプションを追加 [shell] # vi /usr/local/biserver-ce/start-pentaho.sh export CATALINA_OPTS=" -Dfile.encoding=utf8 -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"[/shell]
  8. pentahoの再起動 設定を変更しましたら一旦、pentahoサーバを再起動します [shell] # /usr/local/biserver-ce/stop-pentaho.sh # /usr/local/biserver-ce/start-pentaho.sh [/shell]
  9. 再びブラウザでログインしますとメニューの部分の文字化けが解消しているかと思います

以上でbi-serverのインストールは無事に終わります。あ、大事なことをいうのを忘れましたが、こんpentahoには、webserverも、tomicatも入っております。変に気を回してapacheとか入れないように注意してください。あと、デフォルトのポートは、8080です。

Community