zoukankan      html  css  js  c++  java
  • pentaho bi server 配置MySQL数据库

    软件版本:

    jdk 1.7

    MySQL 5.5

    biserver-ce-6.1.0.1-196 (选择右下方的所有选项See All Activities)

    一、前置环境安装

    1、安装jdk(略)

    2、安装MySQL

    windows下安装MySQL(略)

    centos下在线安装MySQL

    在线安装Mysql
        1°、查看mysql的依赖
            rpm -qa | grep mysql
        2°、删除mysql的依赖
            rpm -e --nodeps `rpm -qa | grep mysql`
        3°、yum安装mysql
            yum -y install mysql-server
        4°、启动mysql服务
            service mysqld start
        5°、加入到开机启动项
            chkconfig mysqld on
        6°、初始化配置mysql服务
            whereis mysql_secure_installation
            执行脚本/usr/bin/mysql_secure_installation
        7°、访问mysql服务
            mysql -h localhost -uroot -proot
        问题:Host '192.168.10.1' is not allowed to connect to this MySQL server
        解决办法:
            mysql> grant all privileges on *.* to 'root'@'%' identified by 'root';
            mysql> flush privileges;    
    View Code

    二、首次启动(使用默认HSQLDB)

    1、将下载好的压缩包解压到指定目录

     

    2、设置环境变量:PENTAHO_HOME

      计算机右击“属性”à“高级系统设置”—>“环境变量”à“新建”,按图所示,根据自己机器实际情况添加环境变量,指向安装好的JRE

    3、启动 bi  server 

    双击 start-pentaho.bat,即可启动server,首次启动等待时间较长,成功启动服务器后会有startup in ... s的提示。

    启动成功后访问地址:http://localhost:8080/pentaho

     三、配置MySQL为默认数据库

    1、导入数据库文件 (biserver-cedatamysql5目录)

    create_jcr_mysql.sql

    create_quartz_mysql.sql       :为Quartz计划任务器创建资源库。

    create_repository_mysql.sql :创建hibernate 数据库,用于存储用户授权认证,solution repository以及数据源。

    ※在版本中缺少了sample_data脚本,可以从5.4之前的版本的包中找到。

    2、添加MySQL驱动

    复制mysql的驱动包到  /opt/ptools/biserver-ce/tomcat/lib/ 目录下

    复制mysql的驱动包到 iserver-ce omcatwebappspentahoWEB-INFlib

    3、biserver-ce/pentaho-solutions/system 目录下

    (1) pentaho.xml 

    关闭前台显示用户列表
    <login-show-users-list>false</login-show-users-list>

    注释测试数据

    <!--
    <sampledata-datasource>
         <name>SampleData</name>
         <host>localhost</host>
         <type>Hypersonic</type>
         <port>9001</port>
         <access>NATIVE</access>
         <username>pentaho_user</username>
         <password>password</password>
         <max-active>20</max-active>
         <max-idle>5</max-idle>
         <max-wait>1000</max-wait>
         <query>select count(*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES</query>
    </sampledata-datasource> -->

    (2)applicationContext-spring-security-jdbc.properties

    注释HSQLDB 配置 ,新增MySQL 配置

    datasource.driver.classname=com.mysql.jdbc.Driver
    datasource.url=jdbc:mysql://localhost:3306/hibernate
    datasource.username=root
    datasource.password=root
    datasource.validation.query=SELECT USER()

    (3)applicationContext-spring-security-hibernate.properties

    注释HSQLDB 配置 ,新增MySQL 配置

    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

    (4)iserver-cepentaho-solutionssystemhibernatehibernate-settings.xml 

    修改配置文件为 MySQL 配置

    <config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>

    (5)iserver-cepentaho-solutionssystemquartzquartz.properties

    org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

    (6)iserver-cepentaho-solutionssystemsimple-jndijdbc.properties

    注释HSQL 配置,添加MySQL配置

    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

    (7)iserver-ce omcatwebappspentahoMETA-INFcontext.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 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()"/>
    </Context>

    (8)iserver-ce omcatwebappspentahoWEB-INFweb.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] -->

    4、启动bi Server,打开浏览器,http://localhost:8080/pentaho/

  • 相关阅读:
    SQLServer.Produce的研究
    petshop以异步方式插入订单的疑惑(后面理解了)
    SQLHelper.GetCachedParameters方法之缓存
    DALFactory抽象工厂理解
    petshop异时消息处理队列抽象工厂
    AJAX学习2(经典)
    对SQLServerDAL.order的研究(不错,有心得)
    Invertory类对商品库存的更新困惑解决了
    AJAX学习1
    用DataSet读取xml文件
  • 原文地址:https://www.cnblogs.com/chinas/p/6544981.html
Copyright © 2011-2022 走看看