Pentaho 5.4.0 安装及mysql配置

由于项目需求,最近开始研究pentaho。


1. 软件准备,jdk1.7, pentaho5.4.0 , mysql 5.x


2. jdk安装

 不再赘述,不过一定不要下jdk1.8,不要下jdk1.8,不要下jdk1.8,重要的事说三遍。pentaho对jdk1.8支持很不好。至少这个版本目前是,6.0的还没有看。这里所讲的版本是指的是pentaho BI Server的版本。


3. pentaho下载

从Sourceforage 上下载

http://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/5.4/biserver-ce-5.4.0.1-130.zip/download

解压后先不要管急着打开,先配置mysql。


4. mysql配置及pentaho迁移

pentaho自带的hsql用起来没有mysql方便,所以需要将pentaho迁移至mysql上。

安装mysql不再赘述,安装好mysql后,执行/Pentaho/biserver-ce/data/mysql5 下的三个sql脚本文件。create_quartz_mysql.sql,create_repository_mysql.sql,create_jcr_mysql.sql。

注: 以上三个脚本会创建三个数据库hibernate、quartz、jackrabbit 和对应的三个用户hibuser、pentaho_user、jcr_user 密码都为password如果在这里你想将密码改成自己的那么以下配置时将对应密码改成你修改的密码即可


create_repository_mysql.sql 代码

CREATE DATABASE IF NOT EXISTS `hibernate` DEFAULT CHARACTER SET latin1;
USE hibernate;
GRANT ALL ON hibernate.* TO 'hibuser'@'localhost' identified by 'password'; 
commit;


修改hibernate配置,Pentaho/biserver-ce/pentaho-solutions/system/hibernate 目录下的hibernate-settings.xml。将

<span style="font-family:KaiTi_GB2312;font-size:18px;"><config-file>system/hibernate/hsql.hibernate.cfg.xml</config-file></span>


修改为:

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


然后修改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>

修改完后,进入Pentaho/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.HSQLDialect

然后修改applicationContext-spring-security-jdbc.properties。以前的版本中直接修改applicationContext-spring-security-jdbc.xml。

# The fully qualified Java class name of the JDBC driver to be used
datasource.driver.classname=com.mysql.jdbc.Driver

# The connection URL to be passed to our JDBC driver to establish a connection
datasource.url=jdbc:mysql://localhost:3306/hibernate

# The connection username to be passed to our JDBC driver to establish a connection
datasource.username=你的数据库登陆账号

# The connection password to be passed to our JDBC driver to establish a connection
datasource.password=你的数据库登陆密码

配置到这里pentaho部分算是配置完毕了,然后需要修改tomcat中的内容。

首先进入Pentaho/biserver-ce/tomcat/conf 目录下的server.xml文件,设置服务器端口。默认为8080,这里我设置为8011。


    <Connector URIEncoding="UTF-8" port="8011" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />

然后进入tomcat/webapps/pentaho/WEB-INF 目录下,修改web.xml。修改为pentaho-solutions所在的路径。如果要让别人访问,localhost设为本地ip

<context-param>
<span style="white-space:pre">	</span><param-name>solution-path</param-name>
<span style="white-space:pre">	</span><param-value>D:\Program Files\Pentaho\biserver-ce\pentaho-solutions</param-value>
</context-param>

<context-param>
    <param-name>fully-qualified-server-url</param-name>
    <param-value>http://localhost:8011/pentaho/</param-value>
</context-param>

进入tomcat/webapps/pentaho/META-INF 目录下,修改context.xml。
<?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>

修改hibernate和quartz数据库账号密码,为之前设置数据库时的配置。

5. 启动pentaho


运行Pentaho/biserver-ce/目录下的start-pentaho.bat,启动成功后,在浏览器输入http://localhost:8011/pentaho,就可以进入用户控制台了。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值