1> 从pentaho官网http://community.pentaho.com/ 下载biserver-ce-4.8.0-stable.zip
2> 解压,在biserver-ce目录下执行start-pentaho.bat,在administration-console目录下执行start-pac.bat, 分别启动user console与admin console
3> pentaho自带了tomcat,直接访问http://localhost:8080/pentaho 可以打开user console,访问http://localhost:8099 可以打开admin console
4> 在biserver-ce目录下执行stop-pentaho.bat 可以关闭user console,在administration-console目录下执行stop-pac.bat可以关闭admin console
二 采用Mysql数据库
pentaho默认采用的是HSQLDb,这里将替换成mysql。
1> 分别运行biserver-ce\data\mysql5目录下的:
create_repository_mysql.sql
create_quartz_mysql.sql
create_sample_datasource_mysql.sql
2> 导入sampledata
可以从我的资源中下载sql语句:http://download.csdn.net/detail/sundongsdu/5139341
3> 修改配置文件:
a) 修改applicationContext-spring-security-jdbc.xml
driverClassName改为com.mysql.jdbc.Driver
url改为jdbc:mysql://localhost:3306/hibernate
b)修改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.MySQLDialect
c) 修改hibernate/hibernate-settings.xml
config-file改为mysql5.hibernate.cfg.xml
d) 修改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/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/quartz"
- validationQuery="select 1"/>
- </Context>
e) 修改mysql hibernate数据库中datasource的值
driverclass改为:com.mysql.jdbc.Driver
URL改为: jdbc:mysql://localhost:3306/sampledata
Query改为:select 1
f) 修改biserver-ce-4.8.0-stable\biserver-ce\pentaho-solutions\system\simple-jndi 下的jdbc.properties 如下:
- SampleData/type=javax.sql.DataSource
- SampleData/driver=com.mysql.jdbc.Driver
- 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
- 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
g) 修改biserver-ce/tomcat/webapps/pentaho/WEB-INF/web.xml
禁掉HSQLDB
Line 87:
- <!-- [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] -->
Line 214:
- <!-- [BEGIN HSQLDB STARTER]
- <listener>
- <listener-class>org.pentaho.platform.web.http.context.HsqldbStartupListener</listener-class>
- </listener>
- [END HSQLDB STARTER] -->
h) 拷贝biserver-ce\tomcat\webapps\pentaho\META-INF\context.xml中的内容到biserver-ce\tomcat\conf\Catalina\localhost\pentaho.xml
i) 按步骤一启动即可
三. 安装saiku插件
Pentaho社区版已经停止了jpivot的支持,转而使用saiku: http://analytical-labs.com/
下载saiku-plugin-2.4.zip以及saiku-webapp-2.4-war
将saiku-plugin-2.4.zip解压至/biserver-ce/pentaho-solutions/system/, 将saiku-webapp-2.4-war 拷贝至biserver-ce\tomcat\webapps,
重启bi server
点击"New Saiku Analytics"可以查看Saiku分析结果,点击"New Analysis"可以查看JPivot分析结果
PS:
问题及解决方案:
Could not load JDBC driver class [com.mysql.jdbc.Driver]
解决方案:
拷贝mysql-connector-java-5.1.20.jar 到tomcat/lib目录
参考文献:
http://sysapp.51cto.com/art/200904/121222.htm
http://interestingittips.wordpress.com/2011/04/27/complete-pentaho-installation-on-ubuntu-part-1/