zookeeper的安装和配置
来源:互联网 发布:g92多头螺纹编程实例 编辑:程序博客网 时间:2024/06/05 07:04
2、find / -name zoo.cfg
vim /etc/zookeeper/conf/zoo.cfg
配置内容如下:
maxClientCnxns=50
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/var/lib/zookeeper/data
dataLogDir=/var/lib/zookeeper/dataLogDir //检查是否存在目录,若不存在,要在系统中创建这两个目录
# the port at which the clients will connect
clientPort=2181
autopurge.purgeInterval=3
autopurge.SnapRetainCount=3
server.1=192.168.232.100:2888:3888
server.2=192.168.232.101:2888:3888
server.3=192.168.232.102:2888:3888
3、把zoo.cfg配置文件拷贝到另外两个节点
scp /etc/zookeeper/conf/zoo.cfg root@192.168.232.101:/etc/zookeeper/conf/
scp /etc/zookeeper/conf/zoo.cfg root@192.168.232.102:/etc/zookeeper/conf/
4、如2中说明,在三个节点上创建相应的目录
mkdir -p /var/lib/zookeeper/datamkdir -p /var/lib/zookeeper/dataLogDir
5、在三台机器上的dataDir指定的目录下创建myid文件,其内容分别为zoo.cfg文件中的server.x的x(例如server.1=192.168.232.100:2888:3888,其对应的myid内容为1)
6、vim /etc/zookeeper/conf/java.env 内容如下:
# zk buffer size 64M
export JVMFLAGS="-Djute.maxbuffer=0x3FFFFC0 $JVMFLAGS"
# java heap size 1GB
export JVMFLAGS="-Xms1g -Xmx1g $JVMFLAGS" //该项设置为1g,根据自己机器的内存情况来设置,太大会导致zkServer.sh脚本启动失败
7、启动zookeeper
./zkServer.sh start
./zkServer.sh status- ZooKeeper的安装和配置
- Zookeeper的安装和配置
- Zookeeper的安装和配置
- zookeeper的安装和配置
- zookeeper的安装和配置
- Zookeeper的安装和配置
- ZooKeeper的安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- Zookeeper 安装和配置
- 如何在vs2010中修改栈的大小
- win 7 64 bit IntelliJ IDEA 中 详细图解 如何使用GitHub(git)来实现项目的版本控制和管理
- 我的CSDN博客
- eclipse中maven插件新建web项目
- test
- zookeeper的安装和配置
- Think in java笔记: Annotation
- 一个数组除了一个元素只出现一次,其他元素全都出现了三次,输出出现一次的元素
- FastDFS分布文件系统Java客户端使用
- 第八周--项目2-建立链串的算法库
- 阿里云数据库团队招聘
- Android-onMeasure使用解决Scrollview嵌套listview冲突
- C++的精髓——虚函数
- 欢迎使用CSDN-markdown编辑器