pentaho 3 6 0 linux and mysql
TRANSCRIPT
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
1/25
Pentaho Business Intelligence Suite 3.6A guide to getting started with MySQL 5.x and Linux
Version 1.3.2
Modified on 17/06/2010
Modified by Prashant Raju
Notes Supports version 3.6
Version 1.3.1
Modified on 09/02/2009
Modified by Prashant Raju
Notes Added TrustedIpAddrs section
Version 1.3
Modified on 08/02/2009
Modified by Prashant Raju
Notes Formatting fixes
Layout fixes
Spelling and grammar fixes
Added descriptions to steps
Added common errors
Added publishing section
Added SMTP section
Added Java section
Fix to MySQL SQL script pack
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 1 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
2/25
Table of Contents
Table of Contents.............................................................................................................. 2
About ............................................................................................................................... 3
Donate ............................................................................................................................. 0The Community ............................................................................................................... 3
Thanks ............................................................................................................................. 3
Getting Started .................................................................................................................. 5
Installing and Configuring Java ....................................................................................... 5
Installing and Configuring MySQL 5.x Server.................................................................. 5
Deploying the Platform .................................................................................................... 6
Packaged Apache-Tomcat Server ............................................................................... 6
Existing Apache-Tomcat Server .................................................................................. 6
MySQL Java Connector ...........................................................................................7
webapps ................................................................................................................... 7
SQL Script Pack .............................................................................................................. 8
Configuring the Databases............................................................................................... 9
Extract the MySQL 5.x SQL Script Pack .........................................................................9
Load the SQL scripts ....................................................................................................... 9
Configuring JDBC Security............................................................................................11
applicationContext-spring-security-jdbc.xml ..............................................................11
applicationContext-spring-security-hibernate.properties............................................11
hibernate-settings.xml ................................................................................................ 12
mysql5.hibernate.cfg.xml (optional) ........................................................................... 12
Configuring Hibernate and Quartz................................................................................. 13
Configuring Apache-Tomcat Server..............................................................................15
solution-path .............................................................................................................. 15
base-url ...................................................................................................................... 15
TrustedIpAddrs........................................................................................................... 16
Other Parameters....................................................................................................... 16Configuring SMTP (mail server)..................................................................................... 17
Configuring Publishing................................................................................................... 19
Configuring the Administration Console......................................................................20
Starting the Business Intelligence Platform................................................................. 21
Starting the Administration Console............................................................................. 24
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 2 of 25
http:///reader/full/page24http:///reader/full/page21http:///reader/full/page20http:///reader/full/page19http:///reader/full/page17http:///reader/full/page16http:///reader/full/page16http:///reader/full/page15http:///reader/full/page15http:///reader/full/page15http:///reader/full/page13http:///reader/full/page12http:///reader/full/page12http:///reader/full/page11http:///reader/full/page11http:///reader/full/page11http:///reader/full/page9http:///reader/full/page9http:///reader/full/page9http:///reader/full/page8http:///reader/full/page7http:///reader/full/page7http:///reader/full/page6http:///reader/full/page6http:///reader/full/page6http:///reader/full/page5http:///reader/full/page5http:///reader/full/page5http:///reader/full/page3http:///reader/full/page3http:///reader/full/page3http:///reader/full/page2 -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
3/25
Introduction
About
To use this guide It is assumed that readers have intermediate to advancedknowledge in their setup of
choice and basic knowledge of Pentaho (although it is not needed). The following operating systems anddatabases are supported:
Windows
MySQL 5.x
PostgreSQL 8.x.x
Oracle 10g & 11g
Linux *
MySQL 5.x *
PostgreSQL 8.x.x
Oracle 10g & 11g
* This tutorial is for Linux and MySQL 5.x setup.
The Community
Don't forget about the other hardworking projects which are part of the Pentaho community and also
deserve a donation:
PAT (Pentaho Analysis Tool)
An alternative to Pentaho's current OLAP analyser tool, JPivot.
CDF (Community Dashboard Framework)
A framework for building dashboards within Pentaho's Business Intelligence Server User Console.
CBF (Community Build Framework)
Is an ant build.xml file script and alternate way to setup and deploy Pentaho based applications
CDA (Community Data Access)
A data access layer forCDF (Community Dashboard Framework).
Thanks
Thanks to the following blogs, individuals, companies and groups:
##pentaho & ##pentaho.pat
IRC channels found on Freenode (Pentaho and Pentaho PAT).
Pentaho Wiki & Pentaho Forums
The first place any new user to Pentaho should look.
Open Source Business Intelligence
Provided a working copy of the sample database for MySQL.
Bizcubed
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 3 of 25
http://www.bizcubed.com.au/http://osbi.nl/http://www.pentaho.com/forumshttp://wiki.pentaho.com/http://freenode.net/http://code.google.com/p/pentaho-cdf/http://pedroalves-bi.blogspot.com/2010/01/cda-community-data-access.htmlhttp://wiki.pentaho.com/display/COM/CBF+-+Community+Build+Frameworkhttp://code.google.com/p/pentaho-cdf/http://code.google.com/p/pentahoanalysistool/ -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
4/25
Provided a working copy of the sample database for PostgreSQL - they are also Australian!
Pentaho Solutions: Business Intelligence and Data Warehousing with Pentaho and MySQL
A book by Roland and Jos van Dongen.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 4 of 25
http://www.amazon.com/Pentaho-Solutions-Business-Intelligence-Warehousing/dp/0470484322 -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
5/25
Getting Started
Installing and Configuring Java
The Pentaho BI Platform requires a JVM (Java Virtual Machine) to be installed on your PC or server. To
check if Java is already installed issue the following command (seen in bold) at the terminal prompt:
user@terminal:~# java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
If a similar output (seen above) is displayed Java is already installed. If not, to install Java on Linux issue
the following commands (seen in bold):
Ubuntu
user@terminal:~# sudo apt-get install sun-java6-jdk sun-java6-jre
Fedora
user@terminal:~# sudo su install sun-java6-jdk sun-java6-jre
The next step is to check if the JAVA_HOME environment variable is setup correctly, issue the following
command (seen in bold) at the terminal prompt:
user@terminal:~# echo $JAVA_HOME
/usr/lib/jvm/java-6-sun
If a similar output (seen above) is displayed the JAVA_HOME environment variable is already setup. To
setup the JAVA_HOME environment variable add this line to the bottom of the /etc/environment file:
JAVA_HOME="/usr/lib/jvm/java-6-sun"
The CATALINA_OPTS environment variable should also be set to tell the Apache-Tomcat server to use
more than the default memory, to do this also add the following line to the bottom of the /etc/
environment file:
CATALINA_OPTS="-Xms256m -Xmx768m -XX:MaxPermSize=256m -
Dsun.rmi.dgc.client.gcInterval=3600000 -
Dsun.rmi.dgc.server.gcInterval=3600000"
From now on every time the PC or server is started/restarted the JAVA_HOME and CATALINA_OPTSenvironment variables will be set automatically.
Installing and Configuring MySQL 5.x Server
Click here for guides forUbuntu and Fedora.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 5 of 25
http://fedorasolved.org/Members/opsec/installing-configuring-mysql-serverhttp://www.howtogeek.com/howto/ubuntu/install-mysql-server-5-on-ubuntu/ -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
6/25
Deploying the Platform
You are able to deploy the platform in many different ways but in this guide I will explain how to deploy it
with the packaged Apache-Tomcat server (comes with the Pentaho BI Server installation file) or with an
existing Apache-Tomcat server.
Packaged Apache-Tomcat Server
You will need to first download the pentaho-ce-3.6.x.stable.tar.gz file from the Pentaho
Sourceforge projects page - this file contains all the files/packages needed for setting up our platform.
After downloading extract its contents into a directory you would like to store the Pentaho BI Server - in
this example I have chosen /opt/pentaho/.
To extract the file and move it the /opt/pentaho/ directory issue the following commands (seen in
bold) at the terminal prompt:
user@terminal:/home/pentaho/tmp/# sudo tar xvzf pentaho-
ce-3.6.0.stable.tar.gzuser@terminal:/home/pentaho/tmp/# sudo mkdir /opt/pentahouser@terminal:/home/pentaho/tmp/# sudo mv ./biserver-ce /opt/pentaho
user@terminal:/home/pentaho/tmp/# sudo mv ./administration-console /opt/
pentaho
The following directories should be visible after you have extracted the TAR file and moved its contents:
opt/
|-- pentaho
| |-- adminstration-console
| |-- biserver-ce
Existing Apache-Tomcat Server
If you would like to deploy the Pentaho BI Platform on an existing Apache-Tomcat server first extract the
contents of the pentaho-ce-3.6.x.stable.tar.gz file found on the Pentaho Sourceforge projects
page. After downloading extract its contents into a directory you would like to store the Pentaho BI Server
- in this example I have chosen /opt/pentaho/.
To extract the file and move it the /opt/pentaho/ directory issue the following commands (seen in
bold) at the terminal prompt:
user@terminal:/home/pentaho/tmp/# sudo tar xvzf pentaho-
ce-3.6.0.stable.tar.gzuser@terminal:/home/pentaho/tmp/# sudo mkdir /opt/pentahouser@terminal:/home/pentaho/tmp/# sudo mv ./biserver-ce /opt/pentaho
user@terminal:/home/pentaho/tmp/# sudo mv ./administration-console /opt/
pentaho
The following directories should be visible after you have extracted the TAR file and moved its contents:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 6 of 25
http://sourceforge.net/projects/pentaho/http://sourceforge.net/projects/pentaho/http://sourceforge.net/projects/pentaho/http://sourceforge.net/projects/pentaho/ -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
7/25
opt/
|-- pentaho
| |-- adminstration-console
| |-- biserver-ce
| |-- pentaho-solutions
| |-- tomcat
| |-- common| `-- lib
| `-- mysql-connector-java-5.0.7.jar (optional)| |-- webapps
| `-- pentaho| `-- pentaho-styles| `-- sw-styles
The files and directories in bold (seen above) will need to be moved to your existing Apache-Tomcat
installation.
MySQL Java Connector
If you already have Apache-Tomcat working with MySQL then you won't need to copy the mysql-
connector-java-5.0.7.jar file to your tomcat's /common/lib directory. If not to copy the mysql-
connector-java-5.0.7.jar issue the following command (in bold) at the terminal prompt:
Ubuntu
user@terminal:~#/ sudo cp /opt/pentaho/biserver-ce/tomcat/common/lib/
mysql-connector-java-5.0.7.jar /opt/tomcat/common/lib
Fedora
user@terminal:~#/ su cp /opt/pentaho/biserver-ce/tomcat/common/lib/
mysql-connector-java-5.0.7.jar /opt/tomcat/common/lib
webapps
You will need to copy all the directories under the /opt/pentaho/biserver-ce/tomcat/webapps/
directory to the webapps/ directory under your existing Apache-Tomcat installation.
To do so make sure you have stopped your Apache-Tomcat server then issue the following command (in
bold) at the terminal prompt:
Ubuntu
user@terminal:~#/ sudo cp /opt/pentaho/biserver-ce/tomcat/webapps /opt/
tomcat/
Fedora
user@terminal:~#/ su cp /opt/pentaho/biserver-ce/tomcat/webapps /opt/
tomcat/
Where /opt/tomcat/webapps/ is the location of your Apache-Tomcat webapps directory. You have
just moved all the webapps which are needed by the Pentaho BI Platform (sw-styles is optional).
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 7 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
8/25
The last step is to move the pentaho-solutions directory into the /pentaho/ directory or any other location
which you would like to store all your pentaho solutions and configuration files. To move the pentaho-
solutions folder to the pentaho directory issue the following command (in bold) at the terminal prompt:
Ubuntu
user@terminal:~#/ sudo mv /opt/pentaho/biserver-ce/pentaho-solutions
/opt/pentaho/
Fedora
user@terminal:~#/ su mv /opt/pentaho/biserver-ce/pentaho-solutions /opt/
pentaho/
One more step will need to be done to make sure Pentaho knows the new location of the pentaho-
solutions directory which will be covered in the "Configuring Apache-Tomcat" section.
The new structure of the pentaho-solutions and existing Apache-Tomcat directory looks like this:
opt/
| |-- pentaho| `-- pentaho-solutions
| |-- tomcat
| `-- webapps
You can now safely remove any other files that came with the original Pentaho BI Platform (only under
the biserver-ce\ folder).
SQL Script Pack
A SQL Script Pack is a set off SQL scripts which will configure all the necessary databases. To download
the SQL Script Pack forMySQL 5.x click here.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 8 of 25
http://docs.google.com/leaf?id=0B9Jmocc0fj_EN2MyZjc4ZjEtNzFkNC00NzIzLTljZTctZjIzZWQ1NjU3MzJk&hl=en -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
9/25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
10/25
mysql> show databases;
Just for reference here are the databases and tables which should of been created after loading the
contents of the MySQL 5.x SQL Script pack:
hibernate*
authorities datasource granted_authorities
users
quartz
qrtz_blob_triggers
qrtz_calendars
qrtz_cron_triggers
qrtz_fired_triggers
qrtz_job_details
qrtz_job_listeners
qrtz_locks
qrtz_paused_trigger_grps qrtz_scheduler_state
qrtz_simple_triggers
qrtz_trigger_listeners
qrtz_triggers
sampledata
customer_w_ter
customers
department_managers
dim_time
employees
offices
orderdetails orderfact
orders
payments
products
quadrant_actuals
trial_balance
* Hibernate will create new tables into the hibernate database after Pentaho BI Platform has started for the first time.
NOTE
If you have problems when running the5_sample_data_mysql.sql scripts with timestamps
you will need to replace all occurances of00.000000000 with 00.000000 - this is an issue withMySQL timezones and timestamps.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 10 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
11/25
Configuring JDBC Security
This section describes how to configure the Pentaho BI Platform JDBC security to use a MySQL server,
this means the Pentaho BI Platform will now point to the hibernate database on the MySQL server
instead of the packaged HSQL database.
NOTE
If you already have a user which you prefer to have access to thehibernate database instead of
the default userhibuser, you will need to modify all occurances ofhibuser/password in this
section.
applicationContext-spring-security-jdbc.xml
This file is located under the pentaho-solutions/system/ directory.
Once the file has opened locate this snippet of code:
Make changes to the highlighted sections so that the section of code looks similar to this:
applicationContext-spring-security-hibernate.properties
This file is located under the pentaho-solutions/system/ directory.
Once the file has opened locate this snippet of code:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 11 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
12/25
jdbc.driver=org.hsqldb.jdbcDriver
jdbc.url=jdbc:hsqldb:hsql://localhost:9001/hibernate
jdbc.username=hibuser
jdbc.password=password
hibernate.dialect=org.hibernate.dialect.HSQLDialect
Make changes to the highlighted sections so that the section of code looks similar to this:
jdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/hibernate
jdbc.username=hibuser
jdbc.password=password
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate-settings.xml
This file is located under the pentaho-solutions/system/hibernate/ directory.
Once the file has opened locate this snippet of code:
system/hibernate/hsql.hibernate.cfg.xml
Make changes to the highlighted section so that the section of code looks similar to this:
system/hibernate/mysql5.hibernate.cfg.xml
mysql5.hibernate.cfg.xml (optional)
This file is located under the pentaho-solutions/system/hibernate/ directory.
You do not need to make any changes to this file if you would like to use the default userhibuser (which
was created with the 4_load_sample_users_mysql.sql file). However, if you would like to specify
your own user find and change the following two lines of code:
hibuser
password
Make changes to the highlighted sections to a username and password of your choice.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 12 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
13/25
Configuring Hibernate and Quartz
Hibernate and Quartz need to specifically use the hibernate and quartz databases which were
created on the MySQL server. To do so modifications need to be made to the context.xml file which is
located in the /tomcat/webapps/pentaho/META-INF/ directory.
NOTE
If you already have a user which you prefer to have access thehibernate database instead of
the default userhibuser, you will need to modify all occurances ofhibuser/password in this
section.This also applies to thepentaho_user/password used to connect to the Quartz
database.
Once the file has opened the following piece of code should be visible:
Make changes to the highlighted sections so that the section of code looks similar to this:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 13 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
14/25
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 14 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
15/25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
16/25
TrustedIpAddrs
If you want to access your Tomcat-Apache server remotely - so in the above step you have not specified
localhost or127.0.0.1 for the base-url parameter - you will need to add your Tomcat-Apache
server's IP address to this list.
Open up the file and locate this line of code:
TrustedIpAddrs
127.0.0.1
Make changes to the highlighted section add your PC or server's domain or IP address so it looks similar
to this:
TrustedIpAddrs
127.0.0.1,[your_ip_address]
This will allow the Pentaho Administration Console to 'ping' the server to see if it is up or down - you do
not need to do this if you are hosting your server locally.
Other Parameters
You can also change the local language and country under the web.xml file, the changes to these
parameters are self explanatory.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 16 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
17/25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
18/25
password
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 18 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
19/25
Configuring Publishing
By default publishing is not enabled, to enable it you will need to specify a password which will need to be
used when publishing. To get started you will need to edit the publisher_config.xml file located
under the /pentaho-solutions/system/ directory, once open locate the following snippet of code:
Enter a password between the publisher-password tags (this password will be the same for all users)
so the snippet of code looks similar to the example below (in this example the publisher password is
publishthis):
publishthis
From now on when any user tries to publish content to Pentaho BI Platform they will need to specify this
password.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 19 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
20/25
Configuring the Administration Console
By default no configuration is needed when setting up Pentaho's Administration Console (PAC) with
MySQL 5.x.
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 20 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
21/25
Starting the Business Intelligence Platform
The Pentaho BI Platform is a webapp on the Apache-Tomcat server. To start Apache-Tomcat you will
need to run the startup.sh file which is located under the /opt/pentaho/biserver-ce/tomcat/
bin folder:
user@terminal:/opt/pentaho/biserver-ce/tomcat/bin# startup.sh
Using CATALINA_BASE: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_HOME: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_TMPDIR: /opt/pentaho/biserver-ce/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-6-sun
Now you should be able to visit http://localhost:8080/pentaho or
http://[your_domain_or_ip]:8080/pentaho . If the Pentaho BI Platform has started successfully
you should see the following welcome screen:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 21 of 25
http://localhost:8080/pentaho -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
22/25
After logging in try and run a sample report from the Steel Wheels solution folder:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 22 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
23/25
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 23 of 25
-
8/8/2019 Pentaho 3 6 0 Linux and MySQL
24/25
Starting the Administration Console
To start the Administration Console you will need to run the start-pac.sh file which is located under
the opt/pentaho/administration-console/ folder:
user@terminal:/opt/pentaho/administration-console# start-pac.sh
DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=/lib/jvm/java-6-sun/
DEBUG: _PENTAHO_JAVA=/lib/jvm/java-6-sun/
2010-01-05 16:27:17.824::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
05/01/2010 4:27:18 PM org.pentaho.pac.server.JettyServer startServer
INFO: Console is starting
2010-01-05 16:27:18.118::INFO: jetty-6.1.2
2010-01-05 16:27:38.672::INFO: Started SocketConnector @ 0.0.0.0:8099
05/01/2010 4:27:38 PM org.pentaho.pac.server.JettyServer startServer
INFO: Console is now started. It can be accessed usinghttp://D119940:8099 or http://161.117.117.40:8099
Now you should be able to visit http://localhost:8099/ or the other two address's specified in your output
(highlighted above). You will be prompted for a Username and Password which by default are "admin"
and "password". If you have successfully started and logged into the administration console you should
see the following welcome screen:
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux
Page 24 of 25
http://localhost:8099/ -
8/8/2019 Pentaho 3 6 0 Linux and MySQL
25/25
Pentaho Business Intelligence Suite 3.6
A guide to getting started with MySQL 5.x and Linux