安装配置
2022-5-5 About 12 min
# 企业版部署
从1.6开始从基于Tomcat部署,改为SpringBoot版本部署
- 如果您要查看1.6之前的部署文档请点击
- 如果您要从Tomcat版本升级到现在的SpringBoot版本请点击
# 项目要求
- JDK1.8 (Java 环境)
- MySQL5.7+/SQLServer/Postgresql/Oracle (系统元数据存储)
- 建议浏览器 Chrome
- 操作系统 Linux(首选CentOS7), Windows
- IBI安装包ibi-2022-xx-xx.zip、元数据创建脚本cboard.sql
- pkg-puppeteer 用于邮件发送
- 用户需有基础的数据库、数据仓库、OLAP 数据分析知识或者 Excel 透视表使用经验
# 元数据准备
# mysql
CREATE DATABASE cboard CHARACTER SET utf8;
1
运行脚本mysql相关脚本,您可以选择通过命令行执行或者拷贝脚本在您熟悉的数据库客户端工具执行
source db/mysql.sql
1
确认数据库创建成功
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cboard |
| mysql |
| performance_schema |
| sys |
+--------------------+
mysql> use cboard;
Database changed
mysql> show tables;
+------------------------+
| Tables_in_cboard_dev |
+------------------------+
| Meta_Version |
| config |
| dashboard_board |
| dashboard_board_param |
| dashboard_category |
| dashboard_dataset |
| dashboard_datasource |
| dashboard_folder |
| dashboard_job |
| dashboard_report |
| dashboard_role |
| dashboard_role_dataset |
| dashboard_role_res |
| dashboard_shared_board |
| dashboard_template |
| dashboard_user |
| dashboard_user_res |
| dashboard_user_role |
| dashboard_widget |
| dataset_role_template |
| form_config |
| form_release |
| log_action |
| log_data_access |
| my_favorite |
+------------------------+
25 rows in set (0.00 sec)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# oracle
运行脚本 db/oracle/cboard.sql
# 安装部署
mkdir ibi
cd ibi
## 把ibi-xxx.zip拷贝到该目录, 运行解压命令,解压到app文件夹,app目录自动创建
unzip -d app ibi-1.6.0.zip
1
2
3
4
2
3
4
Note
下面的介绍中我们把刚才解压的目录成为IBI_HOME, 考虑后续的运维与升级,我们把文件拆分为可以保留
与每次更新需更新
两部分
ls app
## 以下目录和文件可以保留
├── config # 配置文件授权证书存储目录
│ ├── application.properties
│ ├── license.cert
│ ├── logback.xml
│ ├── quartz.properties
├── user-files # 包含upload之类用户生成的文件夹
├── ext-lib # 存放用户添加的第三方jar包,如数据库驱动等
├── start-server.sh # 启动脚本
├── stop-server.sh # 停止脚本
## 以下目录和文件需更新
├── template # 邮件、微信消息 等模板文件
├── static # 存放服务端提供的静态资源
├── webui # 前端资源文件夹
├── ibi.jar # springboot fat jar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
当服务器有多个不同的JDK版本,需要指定Tomcat的运行的JDK版本时
linux设置start-server.sh
export JAVA_HOME=/home/jdk/Java/jdk8
1
# 修改配置文件
修改config/application.properties配置文件夹下面的配置项,其他的配置保持默认
#
# meta datasource
#
datasource.meta.name=meta
datasource.meta.driver-class-name=com.mysql.jdbc.Driver
datasource.meta.url=jdbc:mysql://localhost:3306/cboard_dev?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
datasource.meta.username=root
datasource.meta.password=xxx
datasource.meta.max-active=10
datasource.meta.min-idle=0
datasource.meta.initialSize=1
datasource.meta.breakAfterAcquireFailure=true
server.port=8026
server.servlet.context-path=/cboard
#
# https相关配置
#
#server.ssl.key-store=classpath:.xxxx.jks
#server.ssl.key-store-password=xxx
#server.ssl.keyStoreType=JKS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 启动服务
chmod 755 start-server.sh stop-server.sh
./start-server.sh
./start-server.sh
[IBI] Working path = /root/install/cboard/uat/springboot
[IBI] Set basePath to parent path=.
[IBI] basePath=.
[IBI] Set classpath to '.:.:./ibi.jar:./config:./ext-lib'
[IBI] Server is starting, pid=6644
==========================================
check log command ====> tail -f /root/install/cboard/uat/springboot/logs/cboard.log
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 启动成功之后脚本自动运行tail命令显示实时日期, 用户可以按 ctrl+c 中断日期显示, 不影响服务后台运行
tail -f /root/install/cboard/uat/springboot/logs/cboard.log
1
2
2
http://hostname:port/context
默认用户名与密码为:admin/root123
# 更新License授权文件
- 申请IBI商业授权,需要向服务商提供布局环境硬件信息, 登录系统,右下角点击License信息获取相关信息。
- 获取了正式的商业授权(license.cert文件)之后,覆盖原有授权文件, License更新不需要重启服务
${IBI_HOME}/config/license.cert
# 使用基本步骤
# 利用Nginx同时兼容http和https
{
# https 转发到服务端
server {
listen 443 ssl;
server_name www.ibidemo.com;
ssl_certificate conf.d/www.ibidemo.cn_bundle.pem; #需要将cert-file-name.pem替换成已上传的证书文件的名称。
ssl_certificate_key conf.d/www.ibidemo.cn.key; #需要将cert-file-name.key替换成已上传的证书私钥文件的名称。
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
# 表示使用的加密套件的类型。
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; #表示使用的TLS协议的类型。
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://www.ibidemo.com:8026; # 转发默认服务端口
}
}
# 转发http到https
server {
listen 80;
server_name www.ibidemo.com;
return 301 https://$host$request_uri;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Nginx负载均衡配置
- 包含context写法
upstream lbs {
server 192.168.0.100:8080;
server 192.168.0.101:8080;
}
server {
listen 88;
location /ibi/ { # 结尾的/不能少
proxy_pass http://lbs/;
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
注意
结尾的斜杠不能少 location /ibi/
- 不包含context写法
upstream lbs {
server 192.168.0.100:8080;
server 192.168.0.101:8080;
}
server {
listen 88;
location / {
proxy_pass http://lbs/;
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11