環(huán)境:
CentOS 6.5
Pentaho壓縮包:pentaho-server-ce-7.1.0.0-12.zip
Java:java version "1.8.0_144" (64位)
工作目錄:/pentaho/pentaho-server
注:所有涉及到username和password的內(nèi)容都需要根據(jù)自己配置的數(shù)據(jù)庫修改
按照下面步驟依次修改文件:
- /pentaho/pentaho-server/pentaho-solutions/system/applicationContext-spring-security-jdbc.properties
datasource.driver.classname=com.mysql.jdbc.Driver
datasource.url=jdbc:mysql://localhost:3306/hibernate
datasource.username=root
datasource.password=root (根據(jù)自己的庫更改)
datasource.validation.query=SELECT USER()
- /pentaho/pentaho-server/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
- /pentaho/pentaho-server/pentaho-solutions/system/hibernate/hibernate-settings.xml
system/hibernate/mysql5.hibernate.cfg.xml
- /pentaho/pentaho-server/pentaho-solutions/system/quartz/quartz.properties
解除注釋并修改為: org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
- /pentaho/pentaho-server/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
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
- /pentaho/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml
注釋掉所有的Resource蟋字,增加:
< 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 user()" />
< 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 user()"/>
- /pentaho/pentaho-server/tomcat/webapps/pentaho/WEB-INF/web.xml
注釋掉以下兩段內(nèi)容
< !-- [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] -->
< !-- [BEGIN HSQLDB STARTER] -->
< listener>
< listener-class>org.pentaho.platform.web.http.context.HsqldbStartupListener</listener-class>
< /listener>
< !-- [END HSQLDB STARTER] -->
復(fù)查pentaho官方安裝文檔
復(fù)制驅(qū)動(dòng)包mysql-connector-java-5.1.44-bin.jar到:
/pentaho/pentaho-server/tomcat/lib
QA:
Q1. Pentaho日志目錄:/pentaho/pentaho-server/tomcat/logs
Q2. 問題描述:
Error creating bean with name 'org.h2.tools.Server' defined in file [/pentaho/pentaho-server/pentaho-solutions/system/GettingStartedDB-spring.xml]: Invocation of init method failed; nested exception is org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://localhost:9092)" (port may be in use), cause: "timeout" [90061-131]
暫時(shí)解決方法:
在start-pentaho.sh中增加-Dh2.bindAddress=localhost孤钦,如:
CATALINA_OPTS="-Xms2048m -Xmx6144m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=utf8 -DDI_HOME="$DI_HOME" -Dh2.bindAddress=localhost "
Q3. 報(bào)OPTION SQL_SELECT_LIMIT=5問題
解決方法:換mysql-connector-java.jar校坑,換成mysql-connector-java-5.1.44-bin.jar
Q4. 問題描述:
[org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl]ConnectionServiceImpl.ERROR_0002 - Unable to get the list of connections: DatasourceMgmtService.ERROR_0004 - Error occurred during retrieving the datasource
解決方法:先關(guān)閉BI Server(使用stop-pentaho.sh)晾虑,然后刪除或改名如下文件夾/pentaho-solutions/system/jackrabbit/repository然后重啟BI Server(start-pentaho.sh)