• UID80
  • 登录2017-05-04
  • 粉丝62
  • 关注21
  • 发帖1116
  • 主页
  • 金币6344枚
社区居民
忠实会员
原创写手
潇潇宇 发布于2016-09-09 13:36
0/395

Installing Pentaho 6.1 Community Edition on Ubuntu

楼层直达

Installing Pentaho 6.1 Community Edition on Ubuntu

In this tutorial I will explain what I did to install Pentaho 6.1 business analytics platform on an Ubuntu server.

I will also explain what I did to install Pentaho Data Integration, Pentaho Schema Workbench and Pentaho Report Designer on an Ubuntu Desktop.

For this tutorial I wanted to use my CiviCRM database as the source for reporting and analytics and I will use a seperate mysql database for the data warehouse. The Civicrm database is called civicrm  and the data warehouse database is called datawarehouse

I will use JNDI to connect to both databases.

Pentaho Business Analytics Server (or BI-Server)

Before we start make sure you have an ubuntu server up and running.

First install mysql database server, java, and the zip utility.

On the server enter the following command:

# sudo apt-get install mysql-server zip openjdk-8-jre openjdk-8-jdk libmysql-java

This will install all the required prerequisites.

Now it is time to download the BI-Server. You can download it fromhttp://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/6.1/biserver-ce-6.1.0.1-196.zip/download

After the file is downloaded unzip it.

# unzip biserver-ce-6.1.0.1-196.zip

After you have unzipped it it is time to setup a mysql database for de BI Server and to set the connection for the mysql server.

I have followed the guideline from this blog:https://interestingittips.wordpress.com/2011/05/05/complete-pentaho-installation-on-ubuntu-part-2/

Enter the following commands to install the mysql databases.

# mysql --user root -p < /your/path/to/biserver-ce/data/mysql5/create_repository_mysql.sql
# mysql --user root -p < /your/path/to/biserver-ce/data/mysql5/create_quartz_mysql.sql
# mysql --user root -p < /your/path/to/biserver-ce/data/mysql5/create_jcr_mysql.sql

Now it is time to configure the BI-server to use those databases.

Open /your/path/to/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml and change the lines to match your mysql user and password also change it to use the mysql JDBC driver.

<?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="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>

Make sure the hibernate component will use mysql. Do this by editing the file /your/path/to/biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml and change it to:

<config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>

Edit the file /your/path/to/biserver-ce/pentaho-solutions/system/hibernate/mysql5.hibernate.cfg.xml

<!--  MySQL Configuration -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.username">hibuser</property>
<property name="connection.password">password</property>
<property name="connection.pool_size">10</property>
<property name="show_sql">false</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<!-- replaces DefinitionVersionManager -->

Edit the file /your/path/to/biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/hibernate
jdbc.username=hibuser
jdbc.password=password
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

Edit the file /your/path/to/biserver-ce/pentaho-solutions/system/applicationContext-spring-security-jdbc.xml

<!--  This is only for MySQL. 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>

Modify the JNDI file by editing /your/path/to/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties

Hibernate/type=javax.sql.DataSource
Hibernate/driver=com.mysql.jdbc.Driver
Hibernate/url=jdbc:mysql://localhost:3306/hibernate
Hibernate/user=hibuser
Hibernate/password=password
Quartz/type=javax.sql.DataSource
Quartz/driver=com.mysql.jdbc.Driver
Quartz/url=jdbc:mysql://localhost:3306/quartz
Quartz/user=pentaho_user
Quartz/password=password

Add the mysql connector to the lib folder by making a symlink:

# ln -s /usr/share/java/mysql-connector-java.jar /your/path/to/biserver-ce/tomcat/lib/mysql-connector-java.jar

Edit the file /your/path/to/biserver-ce/tomcat/webapps/pentaho/WEB-INF/web.xml to prevent HSQLDB to start. Remove or make a comment from the lines below.

....

<!-- [BEGIN HSQLDB DATABASES]
<context-param> <param-name>hsqldb-databases</param-name> <param-value>sampledata@../../data/hsqldb/sampledata,hibernate@../../data/hsqldb/hibernate,quartz@../../data/hsqldb/quartz</param-value> </context-param>
[END HSQLDB DATABASES] -->

...


<!-- [BEGIN HSQLDB STARTER]
<listener> <listener-class>org.pentaho.platform.web.http.context.HsqldbStartupListener</listener-class> </listener>
[END HSQLDB STARTER] -->

...

That is it you are now ready to start pentaho.

# /your/path/to/biserver-ce/start-pentaho.sh

You can now access pentaho in your browser athttp://your.server.name:8080

Install PDI on Ubuntu Desktok

Install the Java Runtime environment

sudo apt-get install openjdk-8-jre

Install the Java Development Kit

sudo apt-get install openjdk-8-jdk

After that run the following commands to check whether the installtion is correct:

# which java
/usr/bin/java
# java -version
openjdk version "1.8.0_91" 
...

Download PDI from [[http://sourceforge.net/projects/pentaho/files/Data%20Integration/6.1/pdi-ce-6.1.0.1-196.zip/download]]
After downloading install unzip

# sudo apt-get install unzip

After installing unzip extract the zip

# unzip pdi-ce-6.1.0.1-196.zip
# cd data-integration
# ./spoon.sh

 Install JDBC Driver

See [[http://stackoverflow.com/a/32873938/3853493]] for more information on how to install the mysql JDBC connector

# sudo apt-get install libmysql-java

This should install a file called mysql-connector-java in /usr/share/java

Now we need to create a symlink to this file in the data integration folder.

# ln -s /usr/share/java/mysql-connector-java.jar /your/path/to/data-integration/lib/mysql-connector-java.jar

Configure PDI to use JNDI

Open the file /your/path/to/data-integration/simple-jndi/jdbc.properties in an editor and add the following lines (settings are copied from above).  In the file below we define two connections one to the civicrm database (which is a data source) and one to the datawarehouse.

civicrm/type=javax.sql.DataSource
civicrm/driver=com.mysql.jdbc.Driver
civicrm/user=user
civicrm/password=*
civicrm/url=jdbc:mysql://your.civicrm.server:3306/civicrm
datawarehouse/type=javax.sql.DataSource
datawarehouse/driver=com.mysql.jdbc.Driver
datawarehouse/user=pentaho
datawarehouse/password=*
datawarehouse/url=jdbc:mysql://your.pentaho.mysql.server:3306/datawarehouse

Install Pentaho Schema Workbench on Ubuntu Desktop

Download schema workbench from [[http://sourceforge.net/projects/mondrian/files/schema%20workbench/3.12.0/psw-ce-3.12.0.1-196.zip/download]]

Unzip the file

# unzip psw-ce-3.12.0.1-196.zip

Install the JDBC driver. See instructions from above for JDBC on Ubuntu for PDI.

# ln -s /usr/share/java/mysql-connector-java.jar /your/path/to/schema-workbench/drivers/mysql-connector-java.jar

Then start the workbench with

# /your.path/to/schema-workbench/workbench.sh

Install Pentaho Report Designer on Ubuntu Desktop

Download report designer from [[http://sourceforge.net/projects/pentaho/files/Report%20Designer/6.1/prd-ce-6.1.0.1-196.zip/download]]

Unzip the file

# unzip prd-ce-6.1.0.1-196.zip

Install the JDBC driver. See instructions from above for JDBC on Ubuntu for PDI.

# ln -s /usr/share/java/mysql-connector-java.jar /your/path/to/report-designer/lib/jdbc/mysql-connector-java.jar

Start report designer with the following command

# /your/path/to/report-designer/report-designer.sh

Setup JNDI for report designer

Open the file in /your/home/.pentaho/simple-jndi/default.properties and add the following lines:

civicrm/type=javax.sql.DataSource
civicrm/driver=com.mysql.jdbc.Driver
civicrm/user=user
civicrm/password=*
civicrm/url=jdbc:mysql://your.civicrm.server:3306/civicrm
datawarehouse/type=javax.sql.DataSource
datawarehouse/driver=com.mysql.jdbc.Driver
datewarehouse/user=pentaho
datawarehouse/password=*
datawarehouse/url=jdbc:mysql://your.pentaho.mysql.server:3306/datawarehouse

0人打赏
您需要登录后才可以回帖
发表回复
极贡献
技术问答
专题荟萃
程序人生
视觉设计
Android开发
iOS开发
编程语言
前端开发
后端开发
服务器架构
软件测试
运维方案
创业路上



最热文章墙

  • 66988/361   【精品推荐】200多种Android动画效果的强悍框架,太全了,不看这个,再有动画的问题,不理你了^@^

  • 37781/190   情人节福利,程序员表白的正确姿势:改几行代码就变成自己的表白了

  • 34465/143   省时省力的Android组件群来了,非常棒的原型参考

  • 34363/250   【精品推荐】Android版产品级的音乐播放器源码,功能太强大了,最好的产品原型有木有?

  • 33976/0   Python爬虫:常用浏览器的useragent

  • 27443/2   超全!整理常用的iOS第三方资源

  • 26440/71   原创表白APP,以程序员的姿势备战新年后的7夕,持续完善中!

  • 25718/142   2016抢红包软件及源码

  • 21144/30   麻省理工的一帮疯子,真的实现了随意操控万物!(绝对黑科技)

  • 20840/25   Android工程师面试题大全

  • 20506/27   2016程序员跳槽全攻略

  • 20300/9   GitHub上排名前50的iOS项目:总有一款你用得着

  • 19749/155   Android版类似UC浏览器:非常赞,产品级的源码

  • 19503/20   码魂:程序员的牛B漫画

  • 17708/10   2016年最全的Android面试考题+答案 精编版

  • 17596/3   吐槽那些程序员的搞笑牛逼注释

  • 16642/42   一个绚丽的loading动效分析与实现!

  • 16593/1   iOS 动画总结

  • 16435/84   Android小而全的博客源码:非常适合全面掌握开发技巧

  • 16402/73   【持续更新中】Android福利贴(二):资料源码大放送

  • 15741/45   惊艳的App引导页:背景图片切换加各个页面动画效果

  • 15392/23   个人收集的Android 各类功能源代码

  • 15340/10   女程序员的梦,众网友的神回复

  • 15103/5   新一代Android渠道打包工具:1000个渠道包只需要5秒

  • 15102/11   年会上现场review代码是怎么样的体验!

  • 14657/80   仿京东商城客户端Android最新版,不错的原型和学习资料

  • 14488/23   珍藏多年的素材,灵感搜寻网站

  • 14461/53   基于瀑布流的美女图片浏览App,有注释的源代码

  • 14269/17   用JavaScript 来开发iOS和Android 原生应用:React Native开源框架中文版来啦

  • 14123/98   Android带弹幕的视频播放器源码,来自大名鼎鼎的Bilibili弹幕网站

  • 14094/20   Android福利第三波【Android电子书】

  • 13627/75   【精品推荐】类似360安全卫士安Android源码:非常赞的产品原型

  • 13545/15   基于Android支付宝支付设计和开发方案

  • 13437/18   65条最常用正则表达式,你要的都在这里了

  • 13341/0   iOS中文版资源库,非常全

  • 13012/17   什么是真正的黑客:收获12200+Stars,人气远超微软开源VS

  • 12623/11   有木有这样一张酷图帮你集齐所有git命令超实用

  • 12417/7   一张图搞定iOS学习路线,非常全面

  • 12396/7   用程序员的姿势抢过年的火车票

  • 11996/10   成为Java顶尖程序员 ,看这11本书就够了

  • 11881/44   在线音乐播放器完整版(商用级的源码):非常赞,可听免费高品质专辑

  • 11738/18   一张图搞定Android学习路线,非常全面

  • 11636/10   微信支付终于成功了(安卓,iOS),在此分享

  • 11544/0   GitHub iOS 库和框架Top100 

  • 11520/3   基于Node.js的强大爬虫,能直接发布抓取的文章哦

  • 11287/29   【持续更新中】Android福利贴(一):资料源码

  • 11124/61   【技巧一】搭配Android Studio,如何实现App远程真机debug?

  • 10724/4   46 个非常有用的 PHP 代码片段

  • 10614/3   即时通信第三方库

  • 10300/8   流媒体视频直播方案

  • 10158/9   B站建开源工作组:APP想支持炫酷弹幕的看过来

  • 10091/18   八个最优秀的Android Studio插件

  • 10081/9   烧了5亿美金,这家神秘的公司即将颠覆人类未来!

  • 9874/2   【精品推荐】高质量PHP代码的50个实用技巧:非常值得收藏

  • 9849/10   中国黑客的隐秘江湖:攻守对立,顶尖高手月入千万美元

  • 9302/6   开箱即用!Android四款系统架构工具

  • 9103/10   十大技巧快速提升Android应用开发性能

  • 9076/3   10款GitHub上最火爆的国产开源项目——可以媲美西半球

  • 9075/3   一张图看清Linux 内核运行原理

  • 8803/1   Android性能优化视频,文档以及工具

  • 返回顶部