以下內(nèi)容基于對(duì)Pentaho最新的社區(qū)版本7.1的安裝和配置經(jīng)驗(yàn):
Pentaho是基于Java平臺(tái)的商業(yè)智套件嫁审,之所以說(shuō)它是套件是因?yàn)樗ㄒ粋€(gè)Web Server平臺(tái)和幾個(gè)工具軟件:報(bào)表刃唐、分析、圖表、數(shù)據(jù)集成、數(shù)據(jù)挖掘等苍苞。Pentaho中報(bào)表系統(tǒng)由三部分組成:報(bào)表解釋器(內(nèi)核)、報(bào)表設(shè)計(jì)器(Pentaho Report Designer)牵舵、報(bào)表發(fā)布平臺(tái)(Pentaho BI Server)柒啤。報(bào)表解釋器即Pentaho報(bào)表相關(guān)的Java Api,其中報(bào)表相關(guān)Api又分為:Designer畸颅、Engine担巩、Libraries三部分。報(bào)表設(shè)計(jì)器可以配置數(shù)據(jù)源涛癌、完成數(shù)據(jù)查詢的生成、報(bào)表排版送火、報(bào)表預(yù)覽拳话、導(dǎo)出或發(fā)布報(bào)表模板。在報(bào)表發(fā)布平臺(tái)上用戶可以看到之前發(fā)布過(guò)來(lái)的報(bào)表模板(我理解發(fā)布平臺(tái)上的數(shù)據(jù)源配置應(yīng)該和報(bào)表設(shè)計(jì)器上一致才行)种吸。用戶可以導(dǎo)出自己想要的格式(目前支持Html弃衍、Pdf、Excel坚俗、Excel2007镜盯、CSV、RTF猖败、Text)速缆,其中報(bào)表設(shè)計(jì)器和報(bào)表發(fā)布平臺(tái)都支持導(dǎo)出數(shù)據(jù),換句話說(shuō)可以單獨(dú)使用報(bào)表設(shè)計(jì)器也可以結(jié)合發(fā)布平臺(tái)使用恩闻。因?yàn)樗鼈兌贾С峙渲脭?shù)據(jù)源艺糜、按報(bào)表格式查看、導(dǎo)出數(shù)據(jù)幢尚,唯一的區(qū)別就是發(fā)布平臺(tái)沒(méi)有編輯報(bào)表模板的功能破停。
Pentaho報(bào)表相關(guān)Api地址:
http://javadoc.pentaho.com/reporting710/
Pentaho Report Designer下載地址:
https://sourceforge.net/projects/pentaho/files/Report%20Designer/
Pentaho BI Server下載地址:
https://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/
Java環(huán)境配置
Pentaho基于Java環(huán)境,所以需要先配置Java環(huán)境下侠草,網(wǎng)上有相應(yīng)的教程辱挥,這里就略過(guò)了。
MySQL數(shù)據(jù)庫(kù)安裝
因?yàn)镻entaho BI Server示例中的數(shù)據(jù)庫(kù)是HSQLDB边涕,一般的生成環(huán)境中都是Mysql數(shù)據(jù)庫(kù)晤碘。所以需要先安裝MySql數(shù)據(jù)庫(kù)。后面BI Server的數(shù)據(jù)連接配置會(huì)改成MySQL的功蜓。
集成到Java程序中
官網(wǎng)示例:https://help.pentaho.com/Documentation/7.1/0R0/140
Pentaho Report Designer
下載prd-ce-7.1.0.0-12.zip解壓后進(jìn)入report-designer文件夾园爷,運(yùn)行report-designer.bat即可啟動(dòng)(linux環(huán)境運(yùn)行report-designer.sh)。啟動(dòng)后可以配置數(shù)據(jù)源式撼、設(shè)置SQL查詢童社、設(shè)計(jì)報(bào)表模板、導(dǎo)出報(bào)表著隆、導(dǎo)出報(bào)表模板扰楼、發(fā)布報(bào)表模板到Pentaho BI Server呀癣。(注意:如果要遷移數(shù)據(jù)庫(kù)的話需要安裝相應(yīng)的驅(qū)動(dòng))
官方使用教程:https://help.pentaho.com/Documentation/7.1/0L0/130
Pentaho BI Server
下載pentaho-server-ce-7.1.0.0-12.zip解壓后進(jìn)入pentaho-server文件夾,運(yùn)行start-pentaho.bat即可啟動(dòng)(linux環(huán)境下運(yùn)行start-pentaho.sh)弦赖。服務(wù)器成功啟動(dòng)后项栏,瀏覽器中輸入http://locahost:8080/就看到Pentaho BI
Server的登錄界面了,點(diǎn)擊下面的Login as an Evaluator選擇Administrator登錄進(jìn)入Server蹬竖。Server里面可以配置用戶沼沈、計(jì)劃任務(wù)、郵件服務(wù)器币厕、插件庫(kù)列另、文件管理、查看報(bào)表示例等旦装。
配置BI Server遷移MySql數(shù)據(jù)庫(kù)文檔:https://help.pentaho.com/Documentation/7.1/Installation/Archive/030_Use_mysql_as_repository_database
配置過(guò)程踩過(guò)的坑:
1)Mysql中需要新增hibuser页衙、jcr_user、pentaho_user等用戶阴绢,執(zhí)行示例中的SQL提權(quán)后還是導(dǎo)致報(bào)錯(cuò)的話拷姿,可以手動(dòng)提權(quán)一下。
2)BI Server的插件庫(kù)中有個(gè)中文插件旱函,不過(guò)版本比較舊响巢。有興趣的可以參考下面資料做下漢化。
3)配置過(guò)程中如果報(bào)錯(cuò)棒妨,可以嘗試運(yùn)行下pentaho-server文件夾下面的start-pentaho-debug.bat(linux下運(yùn)行start-pentaho-debug.sh)
4)如果BI Server配置的MySQL是本地的話localhost即可踪古,如果是遠(yuǎn)程機(jī)器的話,需要設(shè)置成Ip地址的形式券腔,注意在MySQL中開(kāi)啟權(quán)限伏穆。
5)因?yàn)?.1版本里沒(méi)有sampledata_mysql.sql所以可以去之前的版本里面找找,手動(dòng)導(dǎo)入到Mysql配置下示例數(shù)據(jù)
6)安裝一些插件的話可能會(huì)導(dǎo)致一些報(bào)錯(cuò)或詭異的問(wèn)題纷纫,所以對(duì)待插件要慎重
7)Report Designer和BI Server如果要做數(shù)據(jù)庫(kù)遷移的話枕扫,都需要添加MySQL驅(qū)動(dòng),可以網(wǎng)上下載下
8)如果遇到如下報(bào)錯(cuò):[org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl]
ConnectionServiceImpl.ERROR_0002 - Unable to get the list of connections:
DatasourceMgmtService.ERROR_0004 - Error occurred during retrieving the
datasource可以先關(guān)閉BI Server然后刪除或改名如下文件夾/pentaho-solutions/system/jackrabbit/repository然后重啟BI Server
視頻教程:https://www.youtube.com/watch?v=nYI7A9giFzE
參考資料:
Pentaho介紹:https://baike.baidu.com/item/Pentaho/3674418?fr=aladdin
項(xiàng)目中集成報(bào)表:http://blog.csdn.net/gancheng/article/details/3858922
http://hudeyong926.iteye.com/blog/1583838
http://wiki.pentaho.com/pages/viewpage.action?pageId=9800175
Pentaho社區(qū):http://community.pentaho.com/
Pentaho官網(wǎng):http://www.pentaho.com/product/product-overview
Sourceforge介紹:https://baike.baidu.com/item/sourceforge/6562141?fr=aladdin
BIServer下載地址:https://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/
Pentaho Report Designer教程:http://blog.csdn.net/zhaizhisheng/article/details/45190663
下載Jre:https://www.java.com/en/download/windows-64bit.jsp
Jre的安裝及配置:http://blog.csdn.net/tiantang_1986/article/details/53894947
下載Jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
PRD教程:http://www.doc88.com/p-1857576569700.html
Pentaho論壇:http://www.itisbi.com/forum.php?mod=forumdisplay&fid=15
Pentaho國(guó)外論壇:http://forums.pentaho.com/index.php
BIserver使用教程:http://www.cnblogs.com/driftingshine/p/6114065.html
Pentaho漢化:http://www.itisbi.com/forum.php?mod=viewthread&tid=281&extra=page=2
MySql安裝包:https://dev.mysql.com/downloads/file/?id=471661
MySQl安裝失敗問(wèn)題:https://www.crifan.com/resolved_mysql_5517_installation_configuration_error_when_mysql-server-55-winx64_100_-_unable_to_configure_service/
Pentaho配置Mysql:http://blog.sina.com.cn/s/blog_7253d6540102w79v.html
http://www.cnblogs.com/chinas/p/6544981.html
http://blog.csdn.net/kissmelove01/article/details/49362003
Pentaho插件配置:http://www.cnblogs.com/driftingshine/p/6114065.html
Pentaho Java文檔:http://javadoc.pentaho.com/bi-platform710/pentaho-platform-api-7.1.0.0-12-javadoc/index.html
Pentaho報(bào)表集成到Java:https://help.pentaho.com/Documentation/7.1/0R0/140
MySQL遷移問(wèn)題解決資料:http://www.cnblogs.com/littlehb/archive/2013/05/06/3062402.html
http://biwithui.blogspot.com/2014/04/error0002-unable-to-get-list-of.html
報(bào)表發(fā)布:https://ask.hellobi.com/blog/doudou1/3551