centos7 安装 zookeeper-3.4.10
来源:互联网 发布:城中村出租屋网络 编辑:程序博客网 时间:2024/05/29 04:53
注意:先安装jdk
1.下载安装包
wget http://apache.fayea.com/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
2.解压安装包
tar -zxvf zookeeper-3.4.10.tar.gz
3.配置
cd zookeeper-3.4.10/conf/
复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:
cp zoo_sample.cfg zoo.cfg
用 vim 打开 zoo.cfg 文件并修改其内容为如下:
# The number of milliseconds of each tick
# zookeeper 定义的基准时间间隔,单位:毫秒
tickTime=2000
时长单位为毫秒,为zk使用的基本时间度量单位。例如,1 * tickTime是客户端与zk服务端的心跳时间,2 * tickTime是客户端会话的超时时间。
tickTime的默认值为2000毫秒,更低的tickTime值可以更快地发现超时问题,但也会导致更高的网络流量(心跳消息)和更高的CPU使用率(会话的跟踪处理)。
# 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.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# dataDir=/tmp/zookeeper
# 数据文件夹
dataDir=/usr/local/services/zookeeper/zookeeper-3.4.10/data
# 日志文件夹
dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.10/logs
# the port at which the clients will connect
# 客户端访问 zookeeper 的端口号
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=192.168.126.128:2888:3888
4.用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容:
# idea - zookeeper-3.4.10 config start
export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.10/
export PATH= PATH=$HADOOP_HOME/bin:$ZOOKEEPER_HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
5.使 /etc/ 目录下的 profile 文件即可生效:source /etc/profile
6.启动服务
进入到 /usr/local/services/zookeeper/zookeeper-3.4.10/bin 目录中:
cd ../bin/
./zkServer.sh start
./zkServer.sh status
关闭 进入bin目录,执行sh
./zkServer.sh stop
7..虚拟机设置菜单"编辑"->"虚拟机网络编辑器"->"NAT模式"->"NAT设置"->"端口转发设置"添加端口:
- centos7 安装 zookeeper-3.4.10
- CentOS7 上安装 Zookeeper-3.4.10 服务
- Linux CentOS7下安装Zookeeper-3.4.10服务(最新)
- Centos7下Zookeeper-3.4.6安装
- centos7.2安装zookeeper-3.4.9
- CentOS7 安装 zookeeper
- CentOS7 安装zookeeper
- CentOS7 安装 zookeeper
- CentOS7安装zookeeper
- CentOS7 安装Zookeeper
- Centos7 Zookeeper安装笔记
- centos7 下安装zookeeper
- CentOs7安装zookeeper
- centos7安装zookeeper
- CentOS7安装zookeeper
- CentOS7安装ZooKeeper(ZooKeeper3.3)
- Centos7之Zookeeper安装配置
- CentOS7安装配置zookeeper集群
- Myeclipse右键项目出现未响应的一种情况
- 创建firefox profile并用selenium1/selenium2启动
- Javase—继承习题
- OJ1125: 上三角矩阵的判断
- 内存管理以及相应的处理(补充)
- centos7 安装 zookeeper-3.4.10
- tomcat集群与Nginx 反向代理负载均衡 session
- WEB前端 -- CSS伪类、伪元素选择器
- 修改linux文件用户组和拥有者
- MATLAB——triu(A,X)
- 创建继承类Person的类Student
- 输出两个数的最大值
- nefuoj1249|洛谷P2345-树状数组&推式子-你牛
- HDOJ1021 Fibonacci Again