1.下载biserver-manual-ce-5.0.1-stable.zip
下载网址http://sourceforge.net/projects/pentaho/files/Business%20Intelligence%20Server/5.0.1-stable/
2.解压 biserver-manual-ce-5.0.1-stable.zip 得到以下文件
将 pentaho-data.zip 解压得到data目录
将 pentaho-solutions.zip 解压得到pentaho-solutions目录
3.安装Mysql数据库(不是本文重点略)
4.创建数据库
将data/mysql5下的三个SQL脚本在Mysql 设计器中运行(无序)
注:以上三个脚本会创建三个数据库hibernate、quartz、jackrabbit 和对应的三个用户hibuser、pentaho_user、jcr_user 密码都为password如果在这里你想将密码改成自己的那么以下配置时将对应密码改成你修改的密码即可
5.创建目录结构
创建biserver目录 将data、pentaho-solutions、apache-tomcat-6.0.37 复制到该目录并将pentaho.war 和pentaho-style.war文件放到tomcat的webapps目录下
6.修改配置文件
将 pentaho-solutions\system\applicationContext-spring-security-hibernate.properties 修改成:
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.MySQL5InnoDBDialect
将 pentaho-solutions\system\hibernate\hibernate-settings.xml 修改成:
Xml代码 system/hibernate/mysql5.hibernate.cfg.xml
将 pentaho-solutions\system\hibernate\mysql5.hibernate.cfg.xml 修改成(如果用默认用户名和密码些文件不用修改 我这里没有改动):
Xml代码
net.sf.ehcache.hibernate.SingletonEhCacheProvider
true
true
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/hibernate
org.hibernate.dialect.MySQL5InnoDBDialect
hibuser
password
10
false
true
update
在 pentaho-solutions\system\quartz\quartz.properties 中找到org.quartz.jobStore.driverDelegateClass将其值修改成:
Properties代码 org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
启动 Tomcat apache-tomcat-6.0.37\webapps 下的war文件会自动解压
注:这时会报错不要管他
等启动完成后关闭Tomcat后 删除 apache-tomcat-6.0.37\webapps 下的war文件
注:一定要在Tomcat关闭的情况下删除否则解压出来的文件也会被Tomcat删除
将 Mysql的驱动放入apache-tomcat-6.0.37\webapps\pentaho\WEB-INF\lib 目录中
将 apache-tomcat-6.0.37\webapps\pentaho\META-INF\context.xml 修改成如下并删除apache-tomcat-6.0.37\conf\Catalina\localhost\pentaho.xml 文件
Xml代码 <?xml version="1.0" encoding="UTF-8"?>
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" />
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"/>
将apache-tomcat-6.0.37\webapps\pentaho\WEB-INF\web.xml 中以下部分删除
Xml代码
org.pentaho.platform.web.http.context.HsqldbStartupListener
hsqldb-databases
sampledata@../../data/hsqldb/sampledata,hibernate@../../data/hsqldb/hibernate,quartz@../../data/hsqldb/quartz
到此pentaho 资源库向Mysql迁移配置全部结束
启动Tomcat
解决pentaho自带样例数据访问报错问题
这时pentaho虽然可以正常运行但是后台一系列的报错真让人心里不安,不用怕 将sampledata_mysql.sql(下载地址 http://url.cn/PeRbnD)在Mysql 设计器中运行 创建数据库 sampledata和用户 pentaho_admin
登录pentaho User Console 打开 Manage Data Sources 修改 发现 sampledata jdbc 连接的为 hsqldb 将其改成你的mysql 连接就可以了
还有一种解决办法是将pentaho 自带的示例去掉
将pentaho-solutions\system\default-content\下的samples.zip和plugin-samples.zip删除(如果运行过biserver这两个文件后面会加上时间如 samples.zip.201404091535)
将pentaho-solutions\system\jackrabbit\repository 删除 如果之前已经设置过repository.xml 存储到Mysql 那需要将 Mysql数据库jackrabbit中对应的表清空
建议将 pentaho-solutions\system\simple-jndi\jdbc.properties 对应hsqldb 的连接都换成 Mysql的
建议将 pentaho-solutions\system\jackrabbit\repository.xml 对应的 Mysql 配置的注释打开 并关闭 对应文件系统配置 例如:
将下面的注释掉
Xml代码
将下的打开
Xml代码