宜信数据采集平台DBus-allinone部署实战案例

摘要:
https://github.com/BriData/DBus/blob/master/docs/quick-start.mdI DBus环境准备DBus安装部署可分为以下两种方式:AllInOne试用版:信息:要安装的密钥源:

          宜信数据采集平台DBus-All In One部署实战案例

                                     作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

  官方文档可参考:https://github.com/BriData/DBus/blob/master/docs/quick-start.md

一.DBus的环境准备

  DBus安装部署分为以下两种方式:
    All In One体验版:
      该版本安装在单机上,自动部署安装dbus所依赖的相关组件,仅用于简单体验dbus基本功能,不可用于生产。
      该版本支持mysql数据源接入体验。

    集群部署:
      用于生产环境或测试环境部署;
      可部署在单机上或集群上;
      该版本包含对Oracle,MySQL,logstash,filebeat,flume等数据源的支持。

  温馨提示:
    本篇博客在于帮助大家搭建一个学习环境,如果机器配置低的小伙伴可以先选一个干净的机器,不要和HDP或CDH集群混搭使用,也不要自己去安装zookeeper,kafka,storm,granfana,logstash等组件,但我们需要单独安装influxdb和mysql服务。
    本篇的操作系统依旧选用CentOS 7.6发行版本。

1>.配置主机名解析

[root@dbus01.yinzhengjie.org.cn ~]# hostname -i
172.200.1.1
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# grep dbus-n1 /etc/hosts
172.200.1.1 dbus-n1 dbus01.yinzhengjie.org.cn
[root@dbus01.yinzhengjie.org.cn ~]# 

宜信数据采集平台DBus-allinone部署实战案例第1张

2>.配置SSH免密登录

宜信数据采集平台DBus-allinone部署实战案例第2张宜信数据采集平台DBus-allinone部署实战案例第3张
[root@dbus01.yinzhengjie.org.cn ~]# ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
Generating public/private rsa key pair.
Created directory '/root/.ssh'.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:JMYBpQLQz/CwFBOP/WmkY2frcWnR8XkUOD94jUxoMQo root@dbus01.yinzhengjie.org.cn
The key's randomart image is:
+---[RSA 2048]----+
|+.+o.oo E   o+.  |
| .== o . . .=... |
| .oB+ = . o. *.o |
|  ..+= + . o.o* .|
|    + * S . o... |
|   . = . o   .   |
|      o +        |
|     . +         |
|      .          |
+----[SHA256]-----+
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
宜信数据采集平台DBus-allinone部署实战案例第4张宜信数据采集平台DBus-allinone部署实战案例第5张
[root@dbus01.yinzhengjie.org.cn ~]# ssh-copy-id root@dbus-n1
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'dbus-n1 (172.200.1.1)' can't be established.
ECDSA key fingerprint is SHA256:y6iS5ipSyWSGRmgcjivbWhd78pKfrcuQHeBPd5H9/U8.
ECDSA key fingerprint is MD5:da:0f:2a:93:c0:d4:6e:7e:13:16:61:f1:93:a7:38:01.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@dbus-n1's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'root@dbus-n1'"
and check to make sure that only the key(s) you wanted were added.

[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ssh-copy-id root@dbus-n1
宜信数据采集平台DBus-allinone部署实战案例第6张宜信数据采集平台DBus-allinone部署实战案例第7张
[root@dbus01.yinzhengjie.org.cn ~]# who
root     pts/0        2020-03-04 16:35 (172.200.0.1)
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ssh root@dbus-n1
Last login: Wed Mar  4 16:56:56 2020 from 172.200.0.1
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# who
root     pts/0        2020-03-04 16:35 (172.200.0.1)
root     pts/1        2020-03-04 17:28 (172.200.1.1)
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# exit 
logout
Connection to dbus-n1 closed.
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ssh root@dbus-n1

3>.宿主机的内存最少得16G以上(否则监测不通过,如下图所示)

宜信数据采集平台DBus-allinone部署实战案例第8张

4>.官方使用的app用户部署(如果你要采用这种方式旧的创建app用户)

[root@dbus02.yinzhengjie.org.cn ~]# adduser app
[root@dbus02.yinzhengjie.org.cn ~]# 
[root@dbus02.yinzhengjie.org.cn ~]# echo "yinzhengjie" | passwd --stdin app 
Changing password for user app.
passwd: all authentication tokens updated successfully.
[root@dbus02.yinzhengjie.org.cn ~]# 

5>.为app用户赋予权限

宜信数据采集平台DBus-allinone部署实战案例第9张 

6>.配置免密

[root@dbus02.yinzhengjie.org.cn ~]# su - app
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ pwd
/home/app
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
Generating public/private rsa key pair.
Created directory '/home/app/.ssh'.
Your identification has been saved in /home/app/.ssh/id_rsa.
Your public key has been saved in /home/app/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:WTLf8O8U0HaENUriX4rn0X92V7F4EWEIVRiVSdeT9QM app@dbus02.yinzhengjie.org.cn
The key's randomart image is:
+---[RSA 2048]----+
|           ooEB@%|
|          . o+=**|
|        o o...o=+|
|         * +oo=.=|
|        S ..o*.+.|
|            o.o.o|
|             .o *|
|             o .+|
|              .  |
+----[SHA256]-----+
[app@dbus02.yinzhengjie.org.cn ~]$ 
宜信数据采集平台DBus-allinone部署实战案例第10张宜信数据采集平台DBus-allinone部署实战案例第11张
[app@dbus02.yinzhengjie.org.cn ~]$ ssh-copy-id app@dbus-n1
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/app/.ssh/id_rsa.pub"
The authenticity of host 'dbus-n1 (172.200.1.2)' can't be established.
ECDSA key fingerprint is SHA256:y6iS5ipSyWSGRmgcjivbWhd78pKfrcuQHeBPd5H9/U8.
ECDSA key fingerprint is MD5:da:0f:2a:93:c0:d4:6e:7e:13:16:61:f1:93:a7:38:01.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
app@dbus-n1's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'app@dbus-n1'"
and check to make sure that only the key(s) you wanted were added.

[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ who
root     pts/0        2020-03-05 04:37 (172.200.0.1)
root     pts/1        2020-03-05 04:46 (172.200.0.1)
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ ssh dbus-n1
Last login: Thu Mar  5 04:47:35 2020 from 172.200.1.2
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ who
root     pts/0        2020-03-05 04:37 (172.200.0.1)
root     pts/1        2020-03-05 04:46 (172.200.0.1)
app      pts/2        2020-03-05 04:47 (172.200.1.2)
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ exit 
logout
Connection to dbus-n1 closed.
[app@dbus02.yinzhengjie.org.cn ~]$ 
[app@dbus02.yinzhengjie.org.cn ~]$ ssh-copy-id app@dbus-n1

二.安装InfluxDB

1>.下载并安装InfluxDB

宜信数据采集平台DBus-allinone部署实战案例第12张宜信数据采集平台DBus-allinone部署实战案例第13张
[root@dbus01.yinzhengjie.org.cn ~]# ll
total 0
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# wget https://dl.influxdata.com/influxdb/releases/influxdb-1.1.0.x86_64.rpm
--2020-03-04 08:06:04--  https://dl.influxdata.com/influxdb/releases/influxdb-1.1.0.x86_64.rpm
Resolving dl.influxdata.com (dl.influxdata.com)... 99.84.194.79, 99.84.194.32, 99.84.194.77, ...
Connecting to dl.influxdata.com (dl.influxdata.com)|99.84.194.79|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15343957 (15M) [application/x-redhat-package-manager]
Saving to: ‘influxdb-1.1.0.x86_64.rpm’

100%[=========================================================================================>] 15,343,957  1.39MB/s   in 11s    

2020-03-04 08:06:16 (1.33 MB/s) - ‘influxdb-1.1.0.x86_64.rpm’ saved [15343957/15343957]

[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ll
total 14988
-rw-r--r-- 1 root root 15343957 Nov 12  2016 influxdb-1.1.0.x86_64.rpm
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# wget https://dl.influxdata.com/influxdb/releases/influxdb-1.1.0.x86_64.rpm    #下载软件源
宜信数据采集平台DBus-allinone部署实战案例第14张宜信数据采集平台DBus-allinone部署实战案例第15张
[root@dbus01.yinzhengjie.org.cn ~]# yum -y localinstall influxdb-1.1.0.x86_64.rpm 
Loaded plugins: fastestmirror
Examining influxdb-1.1.0.x86_64.rpm: influxdb-1.1.0-1.x86_64
Marking influxdb-1.1.0.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package influxdb.x86_64 0:1.1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                        Arch                                                         Version                                                       Repository                                                                    Size
==============================================================================================================================================================================================================================================================================
Installing:
 influxdb                                                       x86_64                                                       1.1.0-1                                                       /influxdb-1.1.0.x86_64                                                        47 M

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 47 M
Installed size: 47 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : influxdb-1.1.0-1.x86_64                                                                                                                                                                                                                                    1/1 
Created symlink from /etc/systemd/system/influxd.service to /usr/lib/systemd/system/influxdb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/influxdb.service to /usr/lib/systemd/system/influxdb.service.
  Verifying  : influxdb-1.1.0-1.x86_64                                                                                                                                                                                                                                    1/1 

Installed:
  influxdb.x86_64 0:1.1.0-1                                                                                                                                                                                                                                                   

Complete!
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# yum -y localinstall influxdb-1.1.0.x86_64.rpm

2>.启动InfluxDB

[root@dbus01.yinzhengjie.org.cn ~]# systemctl start influxdb.service 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl enable influxdb.service 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl list-unit-files | grep influxdb
influxdb.service                              enabled 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
宜信数据采集平台DBus-allinone部署实战案例第16张宜信数据采集平台DBus-allinone部署实战案例第17张
[root@dbus01.yinzhengjie.org.cn ~]# systemctl status influxdb.service 
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-03-04 08:11:56 CST; 4s ago
     Docs: https://docs.influxdata.com/influxdb/
 Main PID: 5440 (influxd)
   CGroup: /system.slice/influxdb.service
           └─5440 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [shard-precreation] 2020/03/04 08:11:56 Starting precreation service with check interval of 10m0s, advance period of 30m0s
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [snapshot] 2020/03/04 08:11:56 Starting snapshot service
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [continuous_querier] 2020/03/04 08:11:56 Starting continuous query service
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [httpd] 2020/03/04 08:11:56 Starting HTTP service
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [httpd] 2020/03/04 08:11:56 Authentication enabled: false
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [httpd] 2020/03/04 08:11:56 Listening on HTTP: [::]:8086
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [retention] 2020/03/04 08:11:56 Starting retention policy enforcement service with check interval of 30m0s
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [run] 2020/03/04 08:11:56 Listening for signals
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: [monitor] 2020/03/04 08:11:56 Storing statistics in database '_internal' retention policy 'monitor', at interval 10s
Mar 04 08:11:56 dbus01.yinzhengjie.org.cn influxd[5440]: 2020/03/04 08:11:56 Sending usage statistics to usage.influxdata.com
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl status influxdb.service

宜信数据采集平台DBus-allinone部署实战案例第18张

3>.初始化配置

#登录influx
influx

#执行初始化脚本
create database dbus_stat_db
use dbus_stat_db
CREATE USER "dbus" WITH PASSWORD 'dbus!@#123'
ALTER RETENTION POLICY autogen ON dbus_stat_db DURATION 15d
宜信数据采集平台DBus-allinone部署实战案例第19张宜信数据采集平台DBus-allinone部署实战案例第20张
> show databases;
name: databases
name
----
_internal
dbus_stat_db

> 
> 
> show databases            #查看现有数据库
宜信数据采集平台DBus-allinone部署实战案例第21张宜信数据采集平台DBus-allinone部署实战案例第22张
> show users
user    admin
----    -----
dbus    false

> 
> show users                #查看现有用户
宜信数据采集平台DBus-allinone部署实战案例第23张宜信数据采集平台DBus-allinone部署实战案例第24张
> show users
user    admin
----    -----
dbus    false

> 
> drop user dbus
> 
> 
> show users;
user    admin
----    -----

> 
> drop user dbus            #删除用户
宜信数据采集平台DBus-allinone部署实战案例第25张宜信数据采集平台DBus-allinone部署实战案例第26张
> show databases
name: databases
name
----
_internal
dbus_stat_db

> drop database dbus_stat_db
> 
> show databases
name: databases
name
----
_internal

> 
> drop database dbus_stat_db     #删除数据库

三.安装MySQL(cannal对MySQL有要求,推荐安装5.7)

1>.下载并安装MySQL

  博主推荐阅读:
    https://www.cnblogs.com/yinzhengjie/p/10371899.html

2>.修改MySQL的配置文件(下面标颜色的是必须得配置的)

[root@dbus01.yinzhengjie.org.cn ~]# egrep -v "^#|^$" /etc/my.cnf
[mysqld]
validate_password_policy=LOW
log-bin=yinzhengjie-mysql-bin
binlog-format=ROW
server_id=1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 

3>.将MySQL设置为开机自启动

[root@dbus01.yinzhengjie.org.cn ~]# systemctl start mysqld.service 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl enable mysqld.service 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl list-unit-files | grep mysqld.service
mysqld.service                                enabled 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
宜信数据采集平台DBus-allinone部署实战案例第27张宜信数据采集平台DBus-allinone部署实战案例第28张
[root@dbus01.yinzhengjie.org.cn ~]# systemctl status mysqld.service 
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-03-04 16:10:20 CST; 3min 9s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 6391 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 6373 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 6394 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─6394 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Mar 04 16:10:19 dbus01.yinzhengjie.org.cn systemd[1]: Stopped MySQL Server.
Mar 04 16:10:19 dbus01.yinzhengjie.org.cn systemd[1]: Starting MySQL Server...
Mar 04 16:10:20 dbus01.yinzhengjie.org.cn systemd[1]: Started MySQL Server.
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# systemctl status mysqld.service

宜信数据采集平台DBus-allinone部署实战案例第29张

四.安装dbus-allinone

1>.下载dbus-allinone软件

  下载地址:
    https://github.com/BriData/DBus/releases

宜信数据采集平台DBus-allinone部署实战案例第30张

2>.解压dbus-allinone.tar.gz软件包

[root@dbus01.yinzhengjie.org.cn ~]# mkdir -pv /yinzhengjie/softwares/dbus
mkdir: created directory ‘/yinzhengjie/softwares/dbus’
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# tar zxf dbus-allinone.tar.gz -C /yinzhengjie/softwares/dbus/
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# ll /yinzhengjie/softwares/dbus/
total 0
drwxr-xr-x 12 500 500 258 Aug 24  2018 dbus-allinone
[root@dbus01.yinzhengjie.org.cn ~]# 

宜信数据采集平台DBus-allinone部署实战案例第31张

3>.初始化数据库

宜信数据采集平台DBus-allinone部署实战案例第32张宜信数据采集平台DBus-allinone部署实战案例第33张
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "show databases"
Enter password: 
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "show databases"
[root@dbus01.yinzhengjie.org.cn ~]# wc -l /yinzhengjie/softwares/dbus/dbus-allinone/sql/init.sql
1106 /yinzhengjie/softwares/dbus/dbus-allinone/sql/init.sql
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p < /yinzhengjie/softwares/dbus/dbus-allinone/sql/init.sql
Enter password: 
[root@dbus01.yinzhengjie.org.cn ~]# 
宜信数据采集平台DBus-allinone部署实战案例第34张宜信数据采集平台DBus-allinone部署实战案例第35张
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "show databases"
Enter password: 
+--------------------+
| Database           |
+--------------------+
| information_schema |
| dbus               |
| dbusmgr            |
| mysql              |
| performance_schema |
| sys                |
| testschema         |
+--------------------+
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "show databases"
宜信数据采集平台DBus-allinone部署实战案例第36张宜信数据采集平台DBus-allinone部署实战案例第37张
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "select user,host from mysql.user"
Enter password: 
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| canal         | %         |
| dbus          | %         |
| dbusmgr       | %         |
| testschema    | %         |
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
+---------------+-----------+
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# mysql -uroot -p -e "select user,host from mysql.user"

宜信数据采集平台DBus-allinone部署实战案例第38张

4>.启动dbus服务

[root@dbus01.yinzhengjie.org.cn ~]# ll /yinzhengjie/softwares/dbus/dbus-allinone/
total 20
drwxr-xr-x  4 500 500   50 Aug 24  2018 allinone-auto-check-0.5.0
drwxr-xr-x 15 500 500  323 Aug 15  2018 apache-storm-1.0.1
drwxrwxr-x  6 500 500   52 Sep  8  2017 canal
drwxrwxr-x  5 500 500   61 Aug 23  2018 dbus-heartbeat-0.5.0
drwxrwxr-x  8 500 500  136 Aug 29  2017 grafana-4.2.0
drwxr-xr-x  8 500 500  119 Mar  2  2018 kafka_2.11-0.10.0.0
drwxrwxr-x  3 500 500  180 Aug 23  2018 keeper
drwxr--r-- 14 500 500  306 Jan 25  2018 logstash-5.6.1
-rw-r--r--  1 500 500  194 Mar  2  2018 readme.txt
drwxrwxr-x  2 500 500   50 Aug 24  2018 sql
-rwxr--r--  1 500 500 9066 Aug 23  2018 start.sh
drwxr-xr-x 11 500 500 4096 Mar  2  2018 zookeeper-3.4.6
[root@dbus01.yinzhengjie.org.cn ~]# 
[root@dbus01.yinzhengjie.org.cn ~]# cd /yinzhengjie/softwares/dbus/dbus-allinone/
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone]# 
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone]# ./start.sh         #启动过程可能要花费2~3分钟,请耐心等待一下

宜信数据采集平台DBus-allinone部署实战案例第39张

5>.生成检查报告看是否启动正常

[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0]# pwd
/yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0]# 
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0]# ll
total 8
-rwxr--r-- 1 500 500 1089 Aug  9  2018 auto-check.sh
drwxr-xr-x 2 500 500   57 Aug 15  2018 conf
drwxr-xr-x 2 500 500 4096 Aug 24  2018 lib
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0]# 
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone/allinone-auto-check-0.5.0]# ./auto-check.sh 

宜信数据采集平台DBus-allinone部署实战案例第40张

6>.

 

五.验证MySQL数据采集

1>.登录Grafana(用户名和密码默认均为admin)

宜信数据采集平台DBus-allinone部署实战案例第41张

2>.往MySQL插入数据验证

宜信数据采集平台DBus-allinone部署实战案例第42张宜信数据采集平台DBus-allinone部署实战案例第43张
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone]# cat readme.txt 

dbus db user:dbus, passwd:j0<C6cqcqr:Dbus

dbusmgr db user:dbusmgr, passwd:HxP31vevLw9PoiT/

canal user:canal, passwd:j0<C6cqcqr:Canal

testdb db  user:testschema, passwd:j0<C6cqcqr:TestSchema
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone]# 
[root@dbus01.yinzhengjie.org.cn /yinzhengjie/softwares/dbus/dbus-allinone]# cat readme.txt
#登录测试用户
mysql -utestschema -p     #testschema账户密码:j0<C6cqcqr:TestSchema
#执行测试脚本
use testschema;
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');

宜信数据采集平台DBus-allinone部署实战案例第44张

3>.查看DBus是否实时获取到数据

宜信数据采集平台DBus-allinone部署实战案例第45张

4>.

六.DBus KeeperUI体验

1>.使用管理员登录(默认管理员用户名为:admin,默认密码为:12345678)

宜信数据采集平台DBus-allinone部署实战案例第46张

  登录成功后,可以看到管理员界面,如下图所示。

宜信数据采集平台DBus-allinone部署实战案例第47张

2>.使用租户登录(默认租户的用户名为:user@dbus.com,默认密码为:12345678)

宜信数据采集平台DBus-allinone部署实战案例第48张

  租户界面登录成功,如下图所示。

宜信数据采集平台DBus-allinone部署实战案例第49张

免责声明:文章转载自《宜信数据采集平台DBus-allinone部署实战案例》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇[Spark SQL]Spark SQL读取Kudu,写入Hive14-学生生病请假:责任链模式下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

flask项目结构(六)快速开发后台flask-admin

简介: Flask-admin 相当django的xadmin吧! 快速装配一个后台用来管理数据。 Flask-admin也是有使用局限性的,他只适合开发小型快速的应用,不适合那种大型并发性高,逻辑复杂的应用。首先,对于大型应用都是前后端分离的,加快访问速度,而且后端装配,尤其是这种动态生成页面的速度更慢。 需要安装Flask-Admin,Flask-Ba...

APP开发选择什么框架好? 请看这里!

背景 App的开发一般都需要满足Android和iOS两个系统环境,也就意味着一个App需要定制两套实现方案,造成开发成本和维护成本都很高。为了解决这个问题,最好的办法就是实现一套代码跨端运行,所以Hybrid App混合应用模式应运而生。在Hybrid App整个开发框架上,有各种各样的框架,各种各样的技术选型,而现在主要的技术就是Web技术,不仅简单,...

Activity简介

Activities简介         Activity类是android应用程序中的一个重要组件,activity对象组织和启动的方式更是android平台应用程序模型的基础。与范式编程使用main()函数启动应用不同,android系统在Activity实列中通过调用符合当前Activity生命周期的回调方法来执行代码。       本文档介绍act...

如何生成Android签名证书、安卓签名获取工具获取APP签名报错:NameNotFoundException: Signs is null的问题

  每个安卓APP,都要签名证书才能安装在手机上,测试的应用有测试的签名证书,生产环境有生产环境的签名证书,在开发APP之前,我们首先生成一个用于该APP的签名证书,用于测试调试应用,像微信支付、分享、地图,这些等等都需要用到生产环境的签名证书。   生成 Android 签名文件,目前有两种一种是 eclipse 开发工具生成的后缀名  .keystor...

Flask(一)

Flask0.Flask简介 Flask是一个基于Python开发并且依赖jinja2模板和Werkzeug WSGI服务的一个微型框架,对于Werkzeug本质是Socket服务端,其用于接收http请求并对请求进行预处理,然后触发Flask框架,开发人员基于Flask框架提供的功能对请求进行相应的处理,并返回给用户,如果要返回给用户复杂的内容时,需要借...

Phalcon下命令行应用(command line applications)

今天打算在phalcon项目下加入一个定时任务,来发送邮件。 看了官网的例子,配置和运行都少许杂乱,还有个bug,见备注, 我这边主要讲解如何将command line 的配置独立出来,如果初上手的同学,建议先运行官网第一个例子,成功后,再实践一下官网第二个例子,出现报错,就看我备注,然后再看我这如何将配置独立处理。 借鉴思想:主要借鉴Yii框架中,类似功...