Pentaho Server社區版開源BI安裝配置詳解


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM