软件版本:
jdk 1.7
MySQL 5.5
biserver-ce-6.1.0.1-196 (选择右下方的所有选项See All Activities)
一、前置环境安装
1、安装jdk(略)
2、安装MySQL
windows下安装MySQL(略)
centos下在线安装MySQL
在线安装Mysql1°、查看mysql的依赖
rpm-qa |grep mysql2°、删除mysql的依赖
rpm-e --nodeps `rpm -qa |grep mysql`3°、yum安装mysql
yum-y install mysql-server4°、启动mysql服务
service mysqld start5°、加入到开机启动项
chkconfig mysqld on6°、初始化配置mysql服务
whereis mysql_secure_installation
执行脚本/usr/bin/mysql_secure_installation7°、访问mysql服务
mysql-h localhost -uroot -proot
问题:Host'192.168.10.1' is not allowed to connect to thisMySQL 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的提示。
三、配置MySQL为默认数据库
1、导入数据库文件 (biserver-ce\data\mysql5目录)
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的驱动包到\biserver-ce\tomcat\webapps\pentaho\WEB-INF\lib
3、biserver-ce/pentaho-solutions/system 目录下
(1) pentaho.xml
关闭前台显示用户列表
false
注释测试数据
(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)\biserver-ce\pentaho-solutions\system\hibernate\hibernate-settings.xml
修改配置文件为 MySQL 配置
system/hibernate/mysql5.hibernate.cfg.xml
(5)\biserver-ce\pentaho-solutions\system\quartz\quartz.properties
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
(6)\biserver-ce\pentaho-solutions\system\simple-jndi\jdbc.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)\biserver-ce\tomcat\webapps\pentaho\META-INF\context.xml
(8)\biserver-ce\tomcat\webapps\pentaho\WEB-INF\web.xml