Report Designer(一)——Pentaho BI安装及配置手册

浏览: 8054

Report Designer的安装很简单,下载下面即可使用。关键是服务器上的配置,因此此处不详细介绍Report Designer,着重说说BISERVER.


 安装

下载

下载列表

https://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/ BISERVER  
http://sourceforge.net/projects/pentaho/files/ Pentaho BI套件的大部分组成部分 比如Pentaho BI平台、报表设计器、Kettle ETL工具等
http://sourceforge.net/projects/mondrian/files/ Mondrian OLAP引擎

资源说明

biserver-manual-ce-x.x.x.stable.zip 自定义安装Pentaho BI平台,资深用户可能会使用到这一工件
biserver-ce-.x.x.x.stable.zip 内置了Pentaho BI服务器及管理控制台的Windows版本,当然解压后可以同样用在其他OS中
biserver-ce-x.x.x.stable.tar.gz 内置了Pentaho BI服务器及管理控制台的非Windows版本,比如Linux,当然解压后可以同样用在其他OS中
biserver-ce-x.x.x.stable-javadoc.zip Pentaho BI平台对应的API规范
bi-platform-x.x.x.stable-sources.zip Pentaho BI平台对应的Java源码

准备工作

1. 解压biserver-ce-x.x.x.stable.zip,有如下目录:

biserver-ce Pentaho BI服务器
administration-console Pentaho管理控制台

2. 设置JAVA_HOME,使用系统安装的JDK。

注:由于Pentaho BI服务器默认是从自带的Tomcat中启动的,如果机器上本来就安装了Tomcat,并设置了相关环境变量,就有可能启动Pentaho BI时会启动之前安装的Tomcat。

运行

启动及访问

  Pentaho BI 服务器 Pentaho 管理控制台
启动 biserver-ce\start-pentaho.bat administration-console\start-pac.bat
停止 biserver-ce\stop-pentaho.bat administration-console\stop-pac.bat
默认服务器 Tomcat Jetty
网址 http://localhost:8080/pentaho http://localhost:8099
帐户/密码 joe/password admin/password

 

注意:

Pentaho BI在登录时默认可能列出用户列表,或者显示示例用户的用户名和,如下:

需要将biserver-ce\pentaho-solutions\system\pentaho.xml文件里的配置为如下才可以避免:

配置

报表发布密码设置

pentaho的发布密码位于pentaho-solutions/system中的publisher_config.xml

    123456

设置完发布密码,可直接将report-design程序设计的报表发布到服务器上。

报表发布

1.        点击report designer上的发布按钮.

 

2.        保存设计好的报表

3.        输入url以及具有访问权限的pentaho用户名以及密码(此处我们用系统默认的用户名:joe 以及密码:password)

注释:此处的Url能用localhost以及127.0.0.1 ,不能用Ip

4.        输入发布密码

5.        点击OK即完成发布。

6.        通过http://localhost:8080/pentaho/Home可打开刚才的网站。

 

JVM参数

为了优化性能,一般需要调整JVM参数。

修改文件biserver-ce\start-pentaho.bat:

set CATALINA_OPTS=-Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

通常-Xmx参数取值不超过物理内存的1/2,-Xms取值最好不要低于-Xmx的1/2。不过,不同生产环境的差异性太大,建议用户能够在生产前进行严格的压力及调优测试,并灵活调整JVM参数。

日志输出策略

Pentaho BI服务器默认采用Log4j记录各种日志。

配置文件位于biserver-ce\tomcat\webapps\pentaho\WEB-INF\classes\log4j.xml

可根据需要修改日志输出策略。

Tomcat参数

为提高 BI 服务器的并行吞吐能力,除了调整JVM参数外,还需要调整Tomcat参数。

配置文件位于biserver-ce\tomcat\conf\server.xml

示例:


通常,我们需要调整maxThreads、minSpareThreads、maxSpareThreads、acceptCount等参数取值。大部分情况下,可以考虑将它们的取值设置成默认的2倍左右,即maxThreads设置成300、minSpareThreads设置成50、maxSpareThreads设置成150、acceptCount设置成200。

    参见:http://wiki.pentaho.com/display/Reporting/8.+Publishing+a+Report

 

 

数据库迁移到Mysql

默认数据库为HSQLDB,用biserver-ce\data\start_hypersonic.bat可启动。

由于HSQLBD不能支撑真实企业应用,所以生产环境必须替换,这里以迁移到mysql为例。

1. 拷贝驱动

将Mysql JDBC驱动拷贝到\biserver-ce-3.9.0-stable\biserver-ce\tomcat\webapps\pentaho\WEB-INF\lib目录,供PentahoBI服务器访问Mysql 数据库使用。

将Mysql JDBC驱动拷贝到\administration-console\jdbc目录,否则用户不能够正常使用Pentaho管理控制台。

2. 修改context.xml

文档位置:biserver-ce\tomcat\webapps\pentaho\META-INF\context.xml

示例如下:

                           

 

3. 启用Mysql配置文件

打开biserver-ce\pentaho-solutions\system\hibernate中的hibernate-settings.xml配置文件,并启用mysql5.hibernate.cfg.xml配置文件,配置示例如下。

   system/hibernate/mysql5.hibernate.cfg.xml

 

4. 修改spring配置文件

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

5.修改spring JDBC配置

D:\biserver-ce-4.8.0-stable\biserver-ce\pentaho-solutions\system

applicationContext-spring-security-jdbc.xml                                                                                              

6.修改JNDI

D:\biserver-ce-4.8.0-stable\biserver-ce\pentaho-solutions\system\simple-jndi 

jdbc.properties  SampleData/url=jdbc:mysql://localhost:3306/sampledata SampleData/user=pentaho_user SampleData/password=password 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 Shark/type=javax.sql.DataSource Shark/driver=com.mysql.jdbc.Driver Shark/url= jdbc:mysql://localhost:3306/shark Shark/user=sa Shark/password= SampleDataAdmin/type=javax.sql.DataSource SampleDataAdmin/driver=com.mysql.jdbc.Driver SampleDataAdmin/url= jdbc:mysql://localhost:3306/sampledata SampleDataAdmin/user=pentaho_admin SampleDataAdmin/password=password

7.配置pentaho.xml

biserver-ce\tomcat\webapps\pentaho\META-INF\context.xml中的内容到biserver-ce\tomcat\conf\Catalina\localhost\pentaho.xml

Pentaho管理控制台

更改admin密码

administration-console\resource\config\login.properties

属性文件存储了admin/password帐号信息,以及admin所属角色集合。此时,password被进行了加密处理。

 

Pentaho管理控制台运行在Jetty Web容器中,而上述密文信息正是借助Jetty的实用类生成的,下面给出了操作示例。用户可以根据自身情况设定各自的系统管理员帐号信息。

D:\administration-console>java -cp lib/jetty-6.1.2.jar;lib/jetty-util-6.1.9.jar org.mortbay.jetty.security.Password admin password password OBF:1v2j1uum1xtv1zej1zer1xtn1uvk1v1v MD5:5f4dcc3b5aa765d61d8327deb882cf99 CRYPT:advwtv/9yU5yQ


推荐 3
本文由 doudou1 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

3 个评论

没看到附件
我重新上传好了,写在word文档的,在这直接复制+粘贴不行。
嗯,收到了。

要回复文章请先登录注册