1. 安装环境
ubuntu 16.04.3 lts
openjdk-8-jdk
mysql-server 5.7.21
mysql-connector-java-5.1.17.jar
pentaho-server-ce-8.0.0.0-28
2. 下载pentaho-server-ce-8.0.0.0-28.zip包并解压
下载地址:https://sourceforge.net/projects/pentaho/files/
保存目录:/opt
# cd /opt
# unzip pentaho-server-ce-8.0.0.0-28.zip
3. 直接启动pentaho-server
# cd /opt/pentaho-server
# ./start-pentaho.sh
DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
DEBUG: _PENTAHO_JAVA=/usr/lib/jvm/java-8-openjdk-amd64/bin/java
--------------------------------------------------------------------------------------------
The Pentaho BI Platform now contains a version checker that will notify you
when newer versions of the software are available. The version checker is enabled by default.
For information on what the version checker does, why it is beneficial, and how it works see:
http://wiki.pentaho.com/display/ServerDoc2x/Version+Checker
Press Enter to continue, or type cancel or Ctrl-C to prevent the server from starting.
You will only be prompted once with this question.
--------------------------------------------------------------------------------------------
[OK]:
Using CATALINA_BASE: /opt/pentaho-server/tomcat
Using CATALINA_HOME: /opt/pentaho-server/tomcat
Using CATALINA_TMPDIR: /opt/pentaho-server/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-8-openjdk-amd64
Using CLASSPATH: /opt/pentaho-server/tomcat/bin/bootstrap.jar:/opt/pentaho-server/tomcat/bin/tomcat-juli.jar
Tomcat started.
4. 访问
http://localhost:8080/pentaho
5. 配置使用mysql数据库
5.1 停止pentaho-server
# ./stop-pentaho.sh
5.2 导入数据库
# mysql -u root -p
> source /opt/pentaho-server/data/mysql5/create_repository_mysql.sql;
> source /opt/pentaho-server/data/mysql5/create_quartz_mysql.sql;
> source /opt/pentaho-server/data/mysql5/create_jcr_mysql.sql;
导入示例数据库:
> source /opt/pentaho-server/data/mysql5/sampledata_mysql.sql;
> source /opt/pentaho-server/data/mysql5/accessinfo.sql;
> source /opt/saiku-server/data/samplesaiku.sql;
5.3 修改配置
# vim pentaho-solutions/system/applicationContext-spring-security-jdbc.properties
datasource.driver.classname=org.mysql.jdbc.Driver
datasource.url=jdbc:mysql://localhost:3306/hibernate
datasource.username=root
datasource.password=keda
# vim pentaho-solutions/system/applicationContext-spring-security-hibernate.properties
jdbc.driver=org.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/hibernate
jdbc.username=hibuser
jdbc.password=password
hibernate.dialect=org.hibernate.dialect.HSQLDialect
# vim pentaho-solutions/system/hibernate/hibernate-settings.xml
<config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>
# vim pentaho-solutions/system/quartz/quartz.properties
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
# vim pentaho-solutions/system/simple-jndi/jdbc.properties
SampleData/type=javax.sql.DataSource
SampleData/driver=org.mysql.jdbc.Driver
SampleData/url=jdbc:mysql://localhost/sampledata
SampleData/user=pentaho_user
SampleData/password=password
Hibernate/type=javax.sql.DataSource
Hibernate/driver=org.mysql.jdbc.Driver
Hibernate/url=jdbc:mysql://localhost/hibernate
Hibernate/user=hibuser
Hibernate/password=password
Quartz/type=javax.sql.DataSource
Quartz/driver=org.mysql.jdbc.Driver
Quartz/url=jdbc:mysql://localhost/quartz
Quartz/user=pentaho_user
Quartz/password=password
Shark/type=javax.sql.DataSource
Shark/driver=org.mysql.jdbc.Driver
Shark/url=jdbc:mysql://localhost/shark
Shark/user=root
Shark/password=keda
SampleDataAdmin/type=javax.sql.DataSource
SampleDataAdmin/driver=org.mysql.jdbc.Driver
SampleDataAdmin/url=jdbc:mysql://localhost/sampledata
SampleDataAdmin/user=root
SampleDataAdmin/password=keda
# vim 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.tomcat.jdbc.pool.DataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
maxWait="10000" username="hibuser" password="password"
driverClassName="org.mysql.jdbc.Driver" url="jdbc:mysql://localhost/hibernate"
validationQuery="select count(*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES" />
<Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
maxWait="10000" username="pentaho_user" password="password"
driverClassName="org.mysql.jdbc.Driver" url="jdbc:mysql://localhost/quartz"
validationQuery="select count(*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES"/>
</Context>
# vim tomcat/webapps/pentaho/WEB-INF/web.xml
注释以下行:
<!-- [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] -->
5.4 复制连接驱动
# cp tomcat/lib/mysql-connector-java-5.1.17.jar tomcat/webapps/pentaho/WEB-INF/lib/
5.5 启动服务器
# ./start-pentaho.sh
6. 遇到的问题
问题1:
Pentaho Initialization Exception
The following errors were detected
One or more system listeners failed. These are set in the systemListeners.xml.
org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequence for org.pentaho.platform.engine.services.connection.datasource.dbcp.DynamicallyPooledDatasourceSystemListener
Please see the server console for more details on each error detected.
解决办法:
# vim pentaho-solutions/system/systemListeners.xml
注释以下行:
<!--<bean id="pooledDataSourceSystemListener" class="org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceSystemListener" />-->
<!--
<bean id="nonPooledDataSourceSystemListener"
class="org.pentaho.platform.engine.services.connection.datasource.dbcp.NonPooledDatasourceSystemListener"/>
-->
<!--<bean id="dynamicallyPooledDataSourceSystemListener" class="org.pentaho.platform.engine.services.connection.datasource.dbcp.DynamicallyPooledDatasourceSystemListener" />-->
<!-- <bean id="quartzSystemListener" class="org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener" />-->
7. 中文汉化相关
7.1 安装简体中文语言包
位置:Marketplace > Available > Simplified Chinese Language Pack Installer
7.2 直接选择界面语言为简体中文
7.3 修改服务器属性并重启
# vim pentaho-solutions/system/server.properties
fully-qualified-server-url=http://localhost:8080/pentaho/
locale-language=zh_CN
locale-country=CN