วันพฤหัสบดีที่ 2 สิงหาคม พ.ศ. 2555

Pentaho 3.8 Linux PostgreSQL. A Guilde to getting start with postgresql-8.4 on Mac

Pentaho 3.8 Linux PostgreSQL. A Guilde to getting start with postgresql-8.4 on Mac


After i configure many Pentaho BI on many machines. I have to do it again today for teach my student how to install and getting start on postgresql.

References


  1. http://www.prashantraju.com/2010/12/pentaho-3-7-with-mysql-postgresql-oracle-and-sql-server/
  2. https://docs.google.com/document/edit?id=1OnvHYsa-nYgwP8bjqRqjP5Vy-gLI5xomOHZtOvA00Ns&pli=1
  3. http://wiki.pentaho.com/display/ServerDoc2x/Configuring+for+PostgreSQL
  4. http://interestingittips.wordpress.com/2011/05/05/complete-pentaho-installation-on-ubuntu-part-2/
(1) and (2) are good articles to starting.
(3) and (4) are more articles to set after you see error about system listener.

Introduction

About

I assume you have installed java and postgresql on your system. And have privilege to create new database. 
Please follow (1) and (2) if you have not complete with Java and Postgresql

Deploying Platform

For me it is a good way to get everything pack into one source. So i download pentaho-source from here 3.8.0-stable

I want to setting my BI in my home directory so i extracted source to my home directory and change name to bi-3.8

wattana@localhost:/home/wattana/bi-3.8$

The following directories show have contents like these.

bi-3.8
|-- administration-console
|-- bi-server-ce

PostgreSQL Java Connector

You have to download postgresql java connector from here http://jdbc.postgresql.org/ . Then put java connector to library path like these.

wattana@localhost:/home/wattana/bi-3.8/biserver-ce/tomcat/lib/postgresql-8.4-703.jdbc4.jar
and
wattana@localhost:/home/wattana/bi-3.8/administration-console/jdbc/postgresql-8.4-703.jdbc4.jar


Configuring PostgreSQL Database

If you follow (2) you must edit script to run on postgresql. You can ask me for postgresql backup archive.!

to create databases run this command

wattana@localhost:/home/wattana $ su                                                    
wattana@localhost:/home/wattana $ su - postgres
postgres@localhost:/var/lib/postgersql $ createuser -d -s -P wattana      # create super user for database
# then create databases
wattana@localhost:/home/wattana $ createdb -U wattana shark
wattana@localhost:/home/wattana $ createdb -U wattana quartz
wattana@localhost:/home/wattana $ createdb -U wattana hibernate
wattana@localhost:/home/wattana $ createdb -U wattana sample data

After you created database you must open script files from (1)  and edit them correctly for postgresql

wattana@localhost:/home/wattana $ psql -U wattana -d hibernate < hibernate.sql wattana@localhost:/home/wattana $ psql -U wattana -d quartz < quarz.sql wattana@localhost:/home/wattana $ psql -U wattana -d shark < shark.sql wattana@localhost:/home/wattana $ psql -U wattana -d hibernate < sampledata.sql


Here you can now follow (2). It's perfect!

After that if you start pentaho by 
wattana@localhost:/home/wattana/bi-3.8/biserver-ce# ./start-pentaho.sh

you may get error about system listener error,


When trying to access the Pentaho BI platform (http://localhost:8080), if you have this error
Error while trying to execute startup sequence for org.pentaho.platform.scheduler.QuartzSystemListener
Then you’ll find a file pentaho.xml in biserver-ce/tomcat/conf/Catalina/localhost/
Replace the contents (or modify the settings) with the same from biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
Hope it helps someone.

You can follow (4) to solve this.