You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6.5 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

一、DataEase最新版本下载

https://community.fit2cloud.com/#/products/dataease/downloads

在线安装

curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start_v2.sh | sh

在线升级

dectl upgrade

二、DataEase发布

1、80端口发布

拉取
docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/openresty/openresty:1.25.3.1-5-alpine-fat
打标
docker tag  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/openresty/openresty:1.25.3.1-5-alpine-fat  docker.io/openresty/openresty:1.25.3.1-5-alpine-fat
编辑 nginx.conf
vi /root/nginx.conf
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    # DataEase 所在机器的IP
    upstream dataease {
        server 10.10.14.203:8100;
    }
    # 配置日志位置
    access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;

    server {
        # 监听端口
        listen   80;
        # 监听域名修改为你自己的域名且域名与nginx所在服务器的IP绑定
        #server_name  dataease.test.com;

        location / {
            client_max_body_size 600m;
            client_body_buffer_size 128k;
            proxy_connect_timeout 600;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            proxy_buffer_size 64k;
            proxy_buffers   4 32k;
            proxy_busy_buffers_size 64k;
            proxy_temp_file_write_size 64k;
            
            proxy_pass http://dataease;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
}
运行
mkdir /root/nginx_logs
docker run  --name openresty -d -v /root/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf -v /root/nginx_logs:/var/log/nginx -p 80:80 openresty/openresty:1.25.3.1-5-alpine-fat

2、用/dataease/发布

参考:DataEase v2 设置动态访问路径,使用 Nginx 路径代理 - FIT2CLOUD 知识库

步骤1

vi /opt/dataease2.0/conf/application.yml
server:
  servlet:
    context-path: /dataease    

步骤2

echo 'DE_CONTEXT_PATH=/dataease' >> /opt/dataease2.0/.env

三、访问方式

系统登录信息如下:
访问地址: https://www.edusoa.com/dataease
用户名: admin
初始密码: DataEase@123456

华为云部署主机的账号

117.78.60.214  
52025
root
DsIdeal@123

四、异常记录

Centos 7.9 root账号,输入reboot不重新启动,怎么办?

答:

yum update -y

然后使用在线安装,注意:不要使用离线包,离线包问题多多!

curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start_v2.sh | sh

DataEase v2 设置动态访问路径,使用 Nginx 路径代理 - FIT2CLOUD 知识库

五、备份与还原

# 原版本机器上运行
dectl upgrade

# 两个机器都要执行
service dataease stop

# 在备份的机器上执行
tar -jcv -f  dataease.tar.bz2 /opt/dataease2.0

# 备份机器上启动服务
service dataease start

# 下载 dataease.tar.bz2 并在还原的机器上传

# 还原
mv /opt/dataease2.0  /opt/dataease2.0.bak 
mkdir /opt/dataease2.0 -p
tar -xjf dataease.tar.bz2 -C  /

# 在还原机上执行
service dataease start

六、运维

数据库用户名和密码
username: root
password: Password123@mysql
停止
dectl stop
启动
dectl start 

七、黑科技

Q、如果在线修改数据库中的表,以达到大屏数据直接修改的目的,而且最初的大屏是产品经理使用Excel进行模拟数据进行设计的,并不是真正的Mysql数据源,能不迁移到Mysql数据源就达到这个修改的目标吗,全部迁移到Mysql的数据源还有好多工作要做,太麻烦~

A:可以采用两个步骤来完成这个目标:

  1. Mysql数据库的3306端口暴露出来,让JAVA可以连接上

    修改Mysql可以使用局域网IP访问

vi  /opt/dataease2.0/docker-compose-mysql.yml 

添加

ports:
   - "0.0.0.0:3306:3306"

完整文件

version: '3'
services:

  mysql-de:
    image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:8.4.0
    container_name: ${DE_MYSQL_HOST}
    ports:

   - "0.0.0.0:3306:3306"
     althcheck:
           test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${DE_MYSQL_USER}", "-p${DE_MYSQL_PASSWORD}", "--protocol","tcp"]
           interval: 5s
           timeout: 3s
           retries: 10
         env_file:
        - ${DE_BASE}/dataease2.0/conf/mysql.env
          lumes:
             - ${DE_BASE}/dataease2.0/conf/my.cnf:/etc/mysql/conf.d/my.cnf
               ${DE_BASE}/dataease2.0/bin/mysql:/docker-entrypoint-initdb.d/
                  - ${DE_BASE}/dataease2.0/data/mysql:/var/lib/mysql
                    tworks:
                       - dataease-network

启动,这样才能按mysql->dataease 顺序去启动

启动

dectl start 

这样,DataEase自己带的Mysql数据库就可以通过宿主机IP+3306来访问到了。

  1. 通过修改其中的数据集完成修改工作

查询数据表

-- 数据源表
-- core_datasource
select * from core_datasource where name like '%岐山%';

-- 数据集组
select  * from core_dataset_group where name like '全省人口变化总体趋势预测';  -- id=1033797259734683648

-- 数据集表
select  table_name from core_dataset_table where dataset_group_id='1034544942506184704';

-- 查询或者修改
select * from `excel_人口变化趋势_e1c9395feb`

更详细的见项目代码。