Mysql + canal + zookeeper环境搭建

Mysql + canal + zookeeper环境搭建

一、mysql集群搭建

1. mysql基本环境

操作系统: Linux version 2.6.32-431.el6.x86_64

数据库:MySQL Community Server 5.7.20

主节点IP:10.60.81.157

主节点IP:10.60.81.158

从节点IP:10.60.81.159

2. 安装mysql

2.1.官网下载MySQL

mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar

2.2. 三个节点都安装:

2.2.1.三个节点查看是否安装mysql

rpm -qa | grep mysql

rpm -e --nodeps mysql-libs-5.1.66-2.el6_3.x86_64 (有则删除)

2.2.2. 三个节点都安装mysql

tar –xvf mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-common-5.7.20-1.el6.x86_64.rpm

rpm -ivh mysql-community-libs-5.7.20-1.el6.x86_64.rpm

rpm -ivh mysql-community-client-5.7.20-1.el6.x86_64.rpm

rpm -ivh mysql-community-server-5.7.20-1.el6.x86_64.rpm

2.3.设置密码

2.3.1. 编辑配置文件my.cnf

[mysqld]

server-id=157  #####这里不同

log-bin=mysql-bin   ####开启二进制日志

log-slave-updates

binlog-format=ROW

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

skip-external-locking

key_buffer_size = 384M

max_allowed_packet = 1M

table_open_cache = 512

sort_buffer_size = 2M

read_buffer_size = 2M

read_rnd_buffer_size = 8M

myisam_sort_buffer_size = 64M

thread_cache_size = 8

query_cache_size = 32M

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

#skip-grant-tables=1

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

2.3.2. 启动mysql

service mysqld start

2.3.3. 获取MySQL的临时密码

如果安装的是RPM包,则默认是/var/log/mysqld.log

2.3.4. 登陆并修改密码

使用默认的密码登陆:

mysql -uroot -p

 

alter user ‘root‘@‘localhost‘  identified  by  ‘[email protected]‘;

flush privileges;

3. 创建同步数据用户及授权用户

3.1.授权其他机器登陆

GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘[email protected]‘ WITH GRANT OPTION;

flush privileges;

3.2. 创建同步用户

grant replication slave on *.*  to ‘mytest‘@‘10.60.81.%‘ identified by ‘[email protected]‘;

4. mysql主主配置

4.1. 配置两台主机及启动

查看两台主机(10.60.81.157、10.60.81.158)配置文件(my.cnf)除了server-id不一样,其他几乎一模一样。配置文件写好后,我们把两台服务器上的mysql服务器启动起来

4.2. 登录10.60.81.157的mysql中查看master状态

mysql> show master status;

+------------------+----------+--------------+------------------+-------------------+

| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |

+------------------+----------+--------------+------------------+-------------------+

| mysql-bin.000002 |     1290 |              |                  |                   |

+------------------+----------+--------------+------------------+-------------------+

1 row in set (0.00 sec)

4.3. 登录10.60.81.158的msyql中,把10.60.81.157配置成自己的主

Change master to master_host=‘10.60.81.157‘,master_port=3306,master_user=‘mytest‘,master_password=‘[email protected]‘,master_log_file=‘mysql-bin.000002‘,master_log_pos=1290;

同上,查看10.60.81.158,然后登录10.60.81.157,把10.60.81.158,配置成自己的主,然后分别在两台机器的mysql中,启动slave

4.4. 启动10.60.81.158状态

mysql> show slave status \G;

*************************** 1. row ***************************

Slave_IO_State: Waiting for master to send event

Master_Host: 10.60.81.158

Master_User: mytest

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000003

Read_Master_Log_Pos: 1290

Relay_Log_File: sz280317-relay-bin.000009

Relay_Log_Pos: 367

Relay_Master_Log_File: mysql-bin.000002

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Replicate_Do_DB:

Replicate_Ignore_DB:

Replicate_Do_Table:

Replicate_Ignore_Table:

Replicate_Wild_Do_Table:

Replicate_Wild_Ignore_Table:

Last_Errno: 0

Last_Error:

Skip_Counter: 0

Exec_Master_Log_Pos: 1290

Relay_Log_Space: 743

Until_Condition: None

Until_Log_File:

Until_Log_Pos: 0

Master_SSL_Allowed: No

Master_SSL_CA_File:

Master_SSL_CA_Path:

Master_SSL_Cert:

Master_SSL_Cipher:

Master_SSL_Key:

Seconds_Behind_Master: 0

Master_SSL_Verify_Server_Cert: No

Last_IO_Errno: 0

Last_IO_Error:

Last_SQL_Errno: 0

Last_SQL_Error:

Replicate_Ignore_Server_Ids:

Master_Server_Id: 158

Master_UUID: b805346c-54e0-11e8-baa8-005056a42d94

Master_Info_File: /var/lib/mysql/master.info

SQL_Delay: 0

SQL_Remaining_Delay: NULL

Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates

Master_Retry_Count: 86400

Master_Bind:

Last_IO_Error_Timestamp:

Last_SQL_Error_Timestamp:

Master_SSL_Crl:

Master_SSL_Crlpath:

Retrieved_Gtid_Set:

Executed_Gtid_Set:

Auto_Position: 0

Replicate_Rewrite_DB:

Channel_Name:

Master_TLS_Version:

1 row in set (0.00 sec)

ERROR:

No query specified

可以看到 Slave_IO_Running: Yes

Slave_SQL_Running: Yes

然后在看10.60.81.158的状态:

mysql> show slave status \G;

*************************** 1. row
***************************

Slave_IO_State: Waiting for
master to send event

Master_Host: 10.60.81.157

Master_User: mytest

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000005

Read_Master_Log_Pos: 717

Relay_Log_File:
sz280318-relay-bin.000010

Relay_Log_Pos: 6027

Relay_Master_Log_File: mysql-bin.000002

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Replicate_Do_DB:

Replicate_Ignore_DB:

Replicate_Do_Table:

Replicate_Ignore_Table:

Replicate_Wild_Do_Table:

Replicate_Wild_Ignore_Table:

Last_Errno: 0

Last_Error:

Skip_Counter: 0

Exec_Master_Log_Pos: 717

Relay_Log_Space: 7402

Until_Condition: None

Until_Log_File:

Until_Log_Pos: 0

Master_SSL_Allowed: No

Master_SSL_CA_File:

Master_SSL_CA_Path:

Master_SSL_Cert:

Master_SSL_Cipher:

Master_SSL_Key:

Seconds_Behind_Master: 0

Master_SSL_Verify_Server_Cert: No

Last_IO_Errno: 0

Last_IO_Error:

Last_SQL_Errno: 0

Last_SQL_Error:

Replicate_Ignore_Server_Ids:

Master_Server_Id: 157

Master_UUID:
1412180f-54c9-11e8-9e3e-005056a436f6

Master_Info_File: /var/lib/mysql/master.info

SQL_Delay: 0

SQL_Remaining_Delay: NULL

Slave_SQL_Running_State: Slave has read all relay log; waiting for more
updates

Master_Retry_Count: 86400

Master_Bind:

Last_IO_Error_Timestamp:

Last_SQL_Error_Timestamp:

Master_SSL_Crl:

Master_SSL_Crlpath:

Retrieved_Gtid_Set:

Executed_Gtid_Set:

Auto_Position: 0

Replicate_Rewrite_DB:

Channel_Name:

Master_TLS_Version:

1 row in set (0.00 sec)

ERROR:

No query specified

5.mysql主从配置

查看两台机器(10.60.81.157、10.60.81.159),把10.60.81.157作主,10.60.81.159作从,与主主配置唯一不同是,不要在主机配置从机为自己的主即可。

二、zookeeper集群搭建

1. zookeeper基本环境

操作系统: Linux version
2.6.32-431.el6.x86_64

Zookeeper:  zookeeper-3.4.12.tar.gz

三台机器:10.60.81.160、10.60.81.161、10.60.81.162

2. zookeeper 安装与配置

2.1.官网下载zookeeper

zookeeper-3.4.12.tar.gz

2.2. 上传到远程节点

scp zookeeper.tar.gz [email protected]

scp zookeeper.tar.gz [email protected]

scp zookeeper.tar.gz [email protected]

2.3. 登录远程节点(其他两个节点的擦作大同小异)

ssh [email protected]

2.4. 解压包,配置,在cnof 目录新建zoo.cfg

sz280320:[email protected]/hgx/zookeeper-3.4.12/conf>cat
zoo.cfg

tickTime=2000

initLimit=5

syncLimit=2

dataDir=/hgx/servers/zookeeper/data

dataLogDir=/hgx/servers/zookeeper/logs

clientPort=4180

server.60=10.60.81.160:2888:3888

server.61=10.60.81.161:2888:3888

server.62=10.60.81.162:2888:3888

在目录上述dataDir的目录中创建myid, 将上述的三个数,server.X(我这里的X是60,61,62),中的X值写入myid文件,三台节点的myid这是不一样的。

3、zookeeper 启动与运行

3.1. 三个节点都要启动

zookeeper/bin/zkServer.sh start

3.2、zookeeper状态检查

sz280320:[email protected]/hgx/zookeeper-3.4.12/bin>./zkCli.sh
-server 10.60.81.160:4180

Connecting to 10.60.81.160:4180

2018-05-21 11:26:37,346 [myid:] - INFO  [main:[email protected]] - Client
environment:zookeeper.version=3.4.12-e5259e437540f349646870ea94dc2658c4e44b3b,
built on 03/27/2018 03:55 GMT

2018-05-21 11:26:37,355 [myid:] - INFO  [main:[email protected]] - Client
environment:host.name=sz280320

2018-05-21 11:26:37,355 [myid:] - INFO  [main:[email protected]] - Client
environment:java.version=1.8.0_151

2018-05-21 11:26:37,361 [myid:] - INFO  [main:[email protected]] - Client
environment:java.vendor=Oracle Corporation

2018-05-21 11:26:37,361 [myid:] - INFO  [main:[email protected]] - Client
environment:java.home=/usr/java/jdk1.8.0_151/jre

2018-05-21 11:26:37,362 [myid:] - INFO  [main:[email protected]] - Client
environment:java.class.path=/hgx/zookeeper-3.4.12/bin/../build/classes:/hgx/zookeeper-3.4.12/bin/../build/lib/*.jar:/hgx/zookeeper-3.4.12/bin/../lib/slf4j-log4j12-1.7.25.jar:/hgx/zookeeper-3.4.12/bin/../lib/slf4j-api-1.7.25.jar:/hgx/zookeeper-3.4.12/bin/../lib/netty-3.10.6.Final.jar:/hgx/zookeeper-3.4.12/bin/../lib/log4j-1.2.17.jar:/hgx/zookeeper-3.4.12/bin/../lib/jline-0.9.94.jar:/hgx/zookeeper-3.4.12/bin/../lib/audience-annotations-0.5.0.jar:/hgx/zookeeper-3.4.12/bin/../zookeeper-3.4.12.jar:/hgx/zookeeper-3.4.12/bin/../src/java/lib/*.jar:/hgx/zookeeper-3.4.12/bin/../conf:

2018-05-21 11:26:37,362 [myid:] - INFO  [main:[email protected]] - Client
environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

2018-05-21 11:26:37,362 [myid:] - INFO  [main:[email protected]] - Client
environment:java.io.tmpdir=/tmp

2018-05-21 11:26:37,362 [myid:] - INFO  [main:[email protected]] - Client
environment:java.compiler=<NA>

2018-05-21 11:26:37,363 [myid:] - INFO  [main:[email protected]] - Client
environment:os.name=Linux

2018-05-21 11:26:37,363 [myid:] - INFO  [main:[email protected]] - Client environment:os.arch=amd64

2018-05-21 11:26:37,363 [myid:] - INFO  [main:[email protected]] - Client
environment:os.version=2.6.32-431.el6.x86_64

2018-05-21 11:26:37,364 [myid:] - INFO  [main:[email protected]] - Client
environment:user.name=cloudera-scm

2018-05-21 11:26:37,364 [myid:] - INFO  [main:[email protected]] - Client
environment:user.home=/home/cloudera-scm

2018-05-21 11:26:37,364 [myid:] - INFO  [main:[email protected]] - Client
environment:user.dir=/hgx/zookeeper-3.4.12/bin

2018-05-21 11:26:37,368 [myid:] - INFO  [main:[email protected]] - Initiating client
connection, connectString=10.60.81.160:4180 sessionTimeout=30000
[email protected]

Welcome to ZooKeeper!

2018-05-21 11:26:37,430 [myid:] - INFO  [main-SendThread(10.60.81.160:4180):[email protected]]
- Opening socket connection to server 10.60.81.160/10.60.81.160:4180. Will not
attempt to authenticate using SASL (unknown error)

JLine support is enabled

2018-05-21 11:26:37,622 [myid:] - INFO  [main-SendThread(10.60.81.160:4180):[email protected]]
- Socket connection established to 10.60.81.160/10.60.81.160:4180, initiating
session

2018-05-21 11:26:37,653 [myid:] - INFO 
[main-SendThread(10.60.81.160:4180):[email protected]] -
Session establishment complete on server 10.60.81.160/10.60.81.160:4180,
sessionid = 0x3c039e8bf59a0003, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None
path:null

三、搭建HA模式的canal

1. canal基本环境

操作系统: Linux version
2.6.32-431.el6.x86_64

canal server: canal.deployer-1.0.25.tar.gz

二台机器:10.60.81.159、10.60.81.158

2.Canal安装

2.1. 官网下载Canal

canal.deployer-1.0.25.tar.gz

2.2. 新建canal用户,并赋予权限

CREATE USER canal IDENTIFIED BY
‘canal‘;

GRANT SELECT, REPLICATION SLAVE,
REPLICATION CLIENT ON *.* TO ‘canal‘@‘%‘;

FLUSH PRIVILEGES;

(在10.60.81.157机器中进入mysql创建canal用户,并赋予权限)

2.3. 上传包到两个远程节点

scp canal.deployer-1.0.25.tar.gz  [email protected]:/hgx/

scp canal.deployer-1.0.25.tar.gz  [email protected]:/hgx/

2.4.二个节点安装canal

tar –zxvf canal.deployer-1.0.25.tar.gz

mv canal.deployer-1.0.25
canal

3. canal配置文件

3.1. canal.properties

#################################################

#########               common argument         #############

#################################################

canal.id= 1

canal.ip=

canal.port= 11111

canal.zkServers=10.60.81.160:4180,10.60.81.161:4180,10.60.81.162:4180

# flush data to zk

canal.zookeeper.flush.period = 1000

# flush meta cursor/parse position to file

canal.file.data.dir = ${canal.conf.dir}

canal.file.flush.period = 1000

## memory store RingBuffer size, should be
Math.pow(2,n)

canal.instance.memory.buffer.size = 16384

## memory store RingBuffer used memory unit
size , default 1kb

canal.instance.memory.buffer.memunit = 1024

## meory store gets mode used MEMSIZE or
ITEMSIZE

canal.instance.memory.batch.mode = MEMSIZE

## detecing config

canal.instance.detecting.enable = false

#canal.instance.detecting.sql = insert into
retl.xdual values(1,now()) on duplicate key update x=now()

canal.instance.detecting.sql = select 1

canal.instance.detecting.interval.time = 3

canal.instance.detecting.retry.threshold =
3

canal.instance.detecting.heartbeatHaEnable
= false

# support maximum transaction size, more
than the size of the transaction will be cut into multiple transactions
delivery

canal.instance.transaction.size =  1024

# mysql fallback connected to new master
should fallback times

canal.instance.fallbackIntervalInSeconds =
60

# network config

canal.instance.network.receiveBufferSize =
16384

canal.instance.network.sendBufferSize =
16384

canal.instance.network.soTimeout = 30

# binlog filter config

#canal.instance.filter.druid.ddl = true

canal.instance.filter.query.dcl = false

canal.instance.filter.query.dml = false

canal.instance.filter.query.ddl = false

canal.instance.filter.table.error = false

canal.instance.filter.rows = false

# binlog format/image check

canal.instance.binlog.format =
ROW,STATEMENT,MIXED

canal.instance.binlog.image = FULL,MINIMAL,NOBLOB

# binlog ddl isolation

canal.instance.get.ddl.isolation = false

#################################################

#########               destinations            #############

#################################################

canal.destinations= kafka

# conf root dir

canal.conf.dir = ../conf

# auto scan instance dir add/remove and
start/stop instance

canal.auto.scan = true

canal.auto.scan.interval = 5

#canal.instance.tsdb.spring.xml=classpath:spring/tsdb/h2-tsdb.xml

#canal.instance.tsdb.spring.xml=classpath:spring/tsdb/mysql-tsdb.xml

canal.instance.global.mode = spring

canal.instance.global.lazy = false

#canal.instance.global.manager.address =
127.0.0.1:1099

#canal.instance.global.spring.xml =
classpath:spring/local-instance.xml

#canal.instance.global.spring.xml =
classpath:spring/memory-instance.xml

#canal.instance.global.spring.xml =
classpath:spring/file-instance.xml

canal.instance.global.spring.xml =
classpath:spring/default-instance.xml

3.2. instance.properties

#################################################

## mysql serverId

canal.instance.mysql.slaveId=1234  ##另外一台机器改成1235,保证slaveId不重复即可

# position info

canal.instance.master.address=10.60.81.157:3306

canal.instance.master.journal.name=

canal.instance.master.position=

canal.instance.master.timestamp=

# table meta tsdb info

canal.instance.tsdb.enable=true

canal.instance.tsdb.dir=${canal.file.data.dir:../conf}/${canal.instance.destination:}

canal.instance.tsdb.url=jdbc:h2:${canal.instance.tsdb.dir}/h2;CACHE_SIZE=1000;MODE=MYSQL;

#canal.instance.tsdb.url=jdbc:mysql://127.0.0.1:3306/canal_tsdb

canal.instance.tsdb.dbUsername=canal

canal.instance.tsdb.dbPassword=canal

#canal.instance.standby.address =

#canal.instance.standby.journal.name =

#canal.instance.standby.position =

#canal.instance.standby.timestamp =

# username/password

canal.instance.dbUsername=canal

canal.instance.dbPassword=canal

canal.instance.defaultDatabaseName=

canal.instance.connectionCharset=UTF-8

# table regex

canal.instance.filter.regex=.*\\..*

# table black regex

canal.instance.filter.black.regex=

#################################################

***上述两个配置文件,黄色标记部分为修改部分在两个服务器上一样***

4. 启动canal服务

两台机器分别执行:canal/bin/zkServer.sh

5. 查看是否启动成功

5.1. 在10.60.81.159查看日志

5.2. 在10.60.81.158查看日志

***上述两服务器日志文件(canal.log)出现如图所示,说明canal的HA搭建成功

原文地址:https://www.cnblogs.com/heguoxiu/p/10036210.html

时间: 2024-10-07 01:05:41

Mysql + canal + zookeeper环境搭建的相关文章

Zookeeper 环境搭建

Zookeeper 环境搭建 1.上传文件并解压 2.修改环境变量 更新配置文件 3.修改 zk 的配置文件 vim /usr/local/zookeeper/conf/zoo.cfg 主要修改数据文件的地址 4.设置 Path 否则不能直接使用命令 5.启动 zk zkServer.sh start //启动zk zkServer.sh status //查看状态 6.客户端连接 zkCli.sh //连接 客户端启动程序来建立一个会话 客户端尝试连接到 localhost/127.0.0.1

ubuntu 13.04下MYSQL 5.5环境搭建

解决的问题: 安装mysql server和mysql client 5.5 新建远程账户 远程访问权限 MYSQL默认字符集修改为UTF8 检查防火墙 一.安装 BTW:可以使用查找命令查看安装包 sudo apt- 安装命令 sudo apt-get install mysql-server-5.5  回车  (有一个带core的,) sudo apt-get install mysql-client-5.5 然后,输入mysql可查看 二.新建远程账户并赋与权限 grant all pri

Innobackup mysql 多实例环境搭建主从同步

Innobackup mysql 多实例环境搭建主从同步 该实验是在mysql多实例环境下做的:如果需要部署 mysql 多实例环境,则移步: mysql 多实例案例实战: http://blog.csdn.net/wanglei_storage/article/details/49305239 mysql 的主从搭建大家有很多种方式,传统的 mysqldump 方式是很多人的选择之一.但对于较大的数据库则该方式并非理想的选择.使用 Xtrabackup 可以快速轻松的构建 mysql 主从架构

MySQL master-slave主从复制环境搭建初试

原文:MySQL master-slave主从复制环境搭建初试 环境为centos 7.2+mysql 5.7,网上教程很多,原理也不复杂(深知自己踩的坑还不够) 正常情况下,配置起来比较简单.另外,根据个人感受,MySQL的复制感觉要比SQL Server的复制要清爽很多(尽管功能上可能有一些差异). master服务器,首先是开启了二进制日志,同时设置server-id为一个具体的数值 1,创建复制用户 GRANT REPLICATION SLAVE ON *.* to 'repl_test

hadoop2.6.2+hbase+zookeeper环境搭建

1.hadoop环境搭建,版本:2.6.2,参考:http://www.cnblogs.com/bookwed/p/5251393.html 启动服务:在master机器上,进入hadoop安装目录,执行命令:./sbin/start-all.sh 查看是否启动成功:jps 2.zookeeper环境搭建,版本:3.4.6,参考:http://www.cnblogs.com/bookwed/p/4599829.html 启动服务:分别在三台机器上,进入zookeeper安装目录,执行命令:./b

Zookeeper环境搭建

Zookeeper环境搭建 下载 从镜像站中下载最近版本 http://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 从文档站中下载所有的历史版本 https://archive.apache.org/dist/zookeeper/ apache-zookeeper-3.5.5-bin.tar.gz 2019-05-20 18:40 10M zookeeper-3.4.6.tar.gz 2016-01-10 17:11 17M 参考文档 https

如何使用mysql(lamp)分离环境搭建dedecms织梦网站及apache服务器常见的403http状态码及其解决方法

一.实验环境 centos6.5+mysql5.5.32+php5.3.27 软件:DedeCMS-V5.7-GBK-SP1 本实验是使用lamp环境搭建,但mysql数据库与之分离,本实验成功的关键在于防火墙及其selinux关闭的前提下实现. 二.实验步骤 1)下载产品,并解压至www目录内 wget -O /home/chen/tools/  http://updatenew.dedecms.com/base-v57/package/DedeCMS-V5.7-GBK-SP1.tar.gz

CentOS 7 yum nginx MySQL PHP 简易环境搭建

用centos自带的yum源来安装nginx,mysql和php,超级方便,省去编译的麻烦,省去自己配置的麻烦,还能节省非常多的时间. 我们先把yum源换成国内的阿里云镜像源(当然不换也可以),先备份一下原来的源镜像文件,以免出错后可以恢复: [[email protected]192 ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载新的CentOS-Base.repo 到/e

ZooKeeper环境搭建(单机/集群)(转)

前提: 配置文件主要是在$ZOOKEEPER_HOME/conf/zoo.cfg,刚解压时为zoo_sample.cfg,重命名zoo.cfg即可. 配置文件常用项参考:http://www.cnblogs.com/EasonJim/p/7483880.html 环境搭建: 一.ZooKeeper的搭建方式 ZooKeeper安装方式有三种,单机模式和集群模式以及伪集群模式. 单机模式:ZooKeeper只运行在一台服务器上,适合测试环境: 伪集群模式:就是在一台物理机上运行多个ZooKeepe