Академический Документы
Профессиональный Документы
Культура Документы
5
MySQL 5.x and Windows Installation Tutorial
Version 1.0, published 7 January 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
1. Table of Contents
1. Table of Contents .......................................................................................................... 0 2. Introduction ................................................................................................................... 0 About ............................................................................................................................... 3 Donate ............................................................................................................................. 3 The Community ............................................................................................................... 3 Thanks ............................................................................................................................. 4 2. Downloads ..................................................................................................................... 5 Java JDK ......................................................................................................................... 5 SQL Script Packs............................................................................................................. 5 Pentaho Business Intelligence Server 3.5 Stable............................................................ 5 3. Setting up the Database ............................................................................................... 7 Extract SQL Script Pack .................................................................................................. 7 Load SQL Scripts ............................................................................................................ 7 4. Setting up the Business Intelligence Server .............................................................. 9 Overview.......................................................................................................................... 9 pentaho-solutions\ ........................................................................................................... 9 applicationContext-spring-security-jdbc.xml ................................................................ 9 applicationContext-spring-security-hibernate.properties............................................ 10 hibernate-settings.xml ................................................................................................ 10 mysql5.hibernate.cfg.xml (optional) ........................................................................... 10 tomcat\ ........................................................................................................................... 10 web.xml (optional) ...................................................................................................... 11 context.xml ................................................................................................................. 11 5. Setting up the Administration Console..................................................................... 13 6. Starting the Business Intelligence Server ................................................................ 14 7. Starting the Administration Console......................................................................... 18 8. Success! ...................................................................................................................... 20
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
2. Introduction
About
This tutorial is an update to the its original "Pentaho Business Intelligence Server 2.0 with MySQL and Linux". Although this tutorial isn't as detailed as it's predecessor it assumes that readers have intermediate to advanced knowledge in their setup of choice. With what this tutorial lacks in detail it definitely makes up to accommodates a lot more of different setups: 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 a Windows and MySQL 5.x setup.
Here is a description of the different colour-coded boxes seen throughout the tutorial: Blue boxes represent help Grey boxes represent tips Green boxes represent file description
Donate
My last tutorial had over 6,000 unique downloads and I believe from most of the feedback and numerous people adding me to Gmail that it was extremely helpful! But contrary to belief I do not work for Pentaho and all of this work is voluntary. So even $1 can help me with producing better and bigger tutorials! You can donate to my PayPal account by clicking here.
The Community
Don't forget about other projects which are part of the Pentaho community: PAT (Pentaho Analysis Tool) An alternative to Pentaho's current OLAP analyser tool, JPivot. CDF (Community Dashboard Framework) A great framework for building dashboards within Pentaho's Business Intelligence Server User Console.
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Thanks
Thanks to the following blogs, people are groups: Open Source Business Intelligence Provided a working copy of the sample database for MySQL. Bizcubed Provided a working copy of the sample database for PostgreSQL. Pentaho Solutions: Business Intelligence and Data Warehousing with Pentaho and MySQL A book by Roland and Jos van Dongen. ##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.
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
2. Downloads
Java JDK
The first thing is to check if you have a version of Java JDK (1.5 or greater) installed on your computer/ server. You can easily check this by opening up a command prompt window and typing in the text found in bold below: C:\Users\Prashant> java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) If you get a similar output to mine above you already have a version of the Java JDK installed. If you don't get the above output here is an indepth tutorial on how to install and configure the Java JDK on Windows (only worry about steps 1 - 24). The next step is to check if you have setup your JAVA_HOME environment variable setup correctly. You can also check this by opening up a command prompt window and typing in the text found in bold below: C:\Users\Prashant>echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_13 If you get a similar output to mine above you already have setup your JAVA_HOME environment variable, if you don't make sure you completed all steps in the tutorial.
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
If you have successfully extracted the ZIP file you should have the following directories: c:\pentaho\ adminstration-console\ biserver-ce\ We will need to make the majority of our changes inside the biserver-ce directory.
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
You must load all these scripts in the order shown above. You can load these files using your favourite MySQL front end tool i.e. MySQL console, Navicat Lite, phpMyAdmin, HeidiSQL etc. In this tutorial I will show you how to load these scripts using the MySQL console. To use MySQL console inside your command prompt window follow this tutorial here.
Now run the following command (in bold) to see if you have successfully created a hibernate, quartz and sampledata database: mysql> show databases;
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Just for reference here are the databases and tables which should of been created after loading the 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
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
pentaho-solutions\
You will need to change the configurations of the following files within the pentaho-solutions/ directory: pentaho-solutions\ system\ applicationContext-spring-security-jdbc.xml applicationContext-spring-security-hibernate.properties hibernate\ hibernate-settings.xml mysql5.hibernate.cfg.xml (optional)
applicationContext-spring-security-jdbc.xml
Once you have opened this file locate this section of code: <!-- This is only for Hypersonic. Please update this section for any other database you are using --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.hsqldb.jdbcDriver" /> <property name="url" value="jdbc:hsqldb:hsql://localhost:9001/hibernate" /> <property name="username" value="hibuser" /> <property name="password" value="password" /> </bean> Make changes to the highlighted section so that your section of code looks similar to this: <!-- This is only for Hypersonic. Please update this section for any other database you are using --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/hibernate" /> <property name="username" value="hibuser" /> <property name="password" value="password" /> </bean>
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
applicationContext-spring-security-hibernate.properties
Once you opened this file you should see the following code: 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 your code looks similar to this: jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/hibernate jdbc.username=hibuser jdbc.password=password hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate-settings.xml
Once you have opened this file locate the following line of code: <config-file>system/hibernate/hsql.hibernate.cfg.xml</config-file> Make changes to the highlighted sections so that your code looks similar to this: <config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>
mysql5.hibernate.cfg.xml (optional)
You do not need to make any changes to this file if you would like to use the default User hibuser - which was created with the 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: <property name="connection.username">hibuser</property> <property name="connection.password">password</property> Make changes to the highlighted sections to a username and password of your choice.
If you would like to use a User which you have created yourself you will also need to make changes to the other files which have hibuser and password specified as the default Username and Password.
tomcat\
You will need to change the configurations of the following files within the tomcat\ directory: tomcat\ webapps\ pentaho\ WEB-INF\
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
web.xml (optional)
You do not need to make any changes to this file if you are happy with visiting the URL http://localhost:8080/pentaho to access Pentaho Business Intelligence Server however, if you would like others to access the site (remotely or on a network) you will need to make changes to this file. Open up the file and locate this line off code: <param-value>http://localhost:8080/pentaho/</param-value> Make changes to the highlighted section to your desired domain or IP address so it looks similar to this: <param-value>http://www.prashantraju.com:8080/pentaho/</param-value> or <param-value>http://100.100.10.1:8080/pentaho/</param-value>
context.xml
Once you have opened up the file you should see the following code: <?xml version="1.0" encoding="UTF-8"?> <Context path="/pentaho" docbase="webapps/pentaho/"> <Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5" maxWait="10000" username="hibuser" password="password" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/hibernate" validationQuery="select count(*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES" /> <Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5" maxWait="10000" username="pentaho_user" password="password" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/quartz" validationQuery="select count(*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES"/> </Context> Make changes to the highlighted sections so that your code looks similar to this: <?xml version="1.0" encoding="UTF-8"?> <Context path="/pentaho" docbase="webapps/pentaho/">
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
<Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5" maxWait="10000" username="hibuser" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hibernate" validationQuery="select 1" /> <Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5" maxWait="10000" username="pentaho_user" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/quartz" validationQuery="select 1"/> </Context>
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
To start Tomcat click on the Start button (to stop Tomcat simply click on the Stop button). Now you should be able to visit http://localhost:8080/pentaho or http://[your_domain_or_ip]:8080/pentaho to see if Pentaho Business Intelligence Server is running. If it is you should see the following welcome screen:
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
After logging in try and run a sample report from the Steel Wheels solution folder:
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju
8. Success!
You have correctly setup Pentaho Business Intelligence Server 3.5 on Windows with MySQL 5.x.
Pentaho Business Intelligence Server 3.5 with MySQL and Windows Installation tutorial, Version 2.0, 7 Jan 2010 by Prashant Raju