|
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 修改成:
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 修改成:
<config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>
将 pentaho-solutions\system\hibernate\mysql5.hibernate.cfg.xml 修改成(如果用默认用户名和密码些文件不用修改 我这里没有改动):
<hibernate-configuration>
<session-factory>
<property name="cache.provider_class">net.sf.ehcache.hibernate.SingletonEhCacheProvider</property>
<property name="hibernate.generate_statistics">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
<!-- 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 -->
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- load resource from classpath -->
<mapping resource="hibernate/mysql5innodb.hbm.xml" />
</session-factory>
</hibernate-configuration>
在 pentaho-solutions\system\quartz\quartz.properties 中找到org.quartz.jobStore.driverDelegateClass将其值修改成:
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 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>
将apache-tomcat-6.0.37\webapps\pentaho\WEB-INF\web.xml 中以下部分删除
<!-- [BEGIN HSQLDB STARTER] -->
<listener>
<listener-class>org.pentaho.platform.web.http.context.HsqldbStartupListener</listener-class>
</listener>
<!-- [END HSQLDB STARTER] -->
<!-- [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] -->
到此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 配置的注释打开 并关闭 对应文件系统配置 例如:
将下面的注释掉
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
将下的打开
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/jackrabbit"/>
<param name="user" value="jcr_user"/>
<param name="password" value="password"/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="fs_repos_"/>
</FileSystem>
我的博客:http://alenzhai.iyunv.com/ |
|
|
|
|
|
|