zookeeper集群及mycat配置搭建

第一部分 zookeeper环境

环境:3台机器

192.168.109.132-134

centos7.2

 

1 linux环境设置

#关闭防火墙

systemctl stop firewalld.service

systemctl disable firewalld.service

 

#关闭SELINUX

sed -i's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux

setenforce 0

 

#设置时间

timedatectl set-ntp no

timedatectl set-timezone Asia/Shanghai

#手动设置为当前时间

timedatectl set-time "2017-10-1713:52:16"

timedatectl set-local-rtc 1

timedatectl set-ntp yes

 

2 安装配置zookeeper

#安装/root/zookeeper-3.4.10.tar.gz

cd /usr/local

tar zxvf /root/zookeeper-3.4.10.tar.gz

mv zookeeper-3.4.10 zookeeper

 

cd zookeeper

mkdir -p data log

 

cd conf

cp zoo_sample.cfg zoo.cfg

vim zoo.cfg

 

# The number of milliseconds of each tick

# 心跳检查的时间 2秒

tickTime=2000

# The number of ticks that the initial

# synchronization phase can take

# 初始化时 连接到服务器端的间隔次数,总时间10*2=20秒

initLimit=10

# The number of ticks that can pass between

# sending a request and getting anacknowledgement

# ZK Leader 和follower 之间通讯的次数,总时间5*2=10秒

syncLimit=5

# the directory where the snapshot isstored.

# do not use /tmp for storage, /tmp here isjust

# example sakes.

# 存储内存中数据库快照的位置,如果不设置参数,更新事务日志将被存储到默认位置/tmp

dataDir=/usr/local/zookeeper/data

# 错误日志的存放位置

dataLogDir=/usr/local/zookeeper/log

# the port at which the clients willconnect

clientPort=2181

server.1=192.168.109.132:2888:3888

server.2=192.168.109.133:2888:3888

server.3=192.168.109.134:2888:3888

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值