Linux 安装Zookeeper集群
2017-10-18 16:31
423 查看
1.解压,配置环境变量
export ZOOKEEPER_HOME=/usr/local/zk
export PATH=.:$HADOOP_HOME/bin:$ZOOKEEPER_HOME/bin:$JAVA_HOME/bin:$PATH
启动ZooKeeper的Server:zkServer.sh start;关闭ZooKeeper的Server:zkServer.sh stop
2.配置zoo.cfg
在/usr/local/zk/data新建myid 和当前的server.X对应。
3.启动,查看状态
export ZOOKEEPER_HOME=/usr/local/zk
export PATH=.:$HADOOP_HOME/bin:$ZOOKEEPER_HOME/bin:$JAVA_HOME/bin:$PATH
启动ZooKeeper的Server:zkServer.sh start;关闭ZooKeeper的Server:zkServer.sh stop
2.配置zoo.cfg
# 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=/usr/local/zk/data # the port at which the clients will connect clientPort=2181 #the location of the log file dataLogDir=/usr/local/zk/logs server.0=192.168.12.12:2287:3387 server.1=192.168.12.13:2287:3387 server.2=192.168.12.14:2287:3387
在/usr/local/zk/data新建myid 和当前的server.X对应。
3.启动,查看状态
zkServer.sh start zoo1.sh zkServer.sh status 如果启动没问题,状态出现其他两台机子网络异常,请检查防火墙。
#关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
相关文章推荐
- linux下安装zookeeper(非集群)
- Linux6.6安装Zookeeper-集群
- zookeeper-集群安装部署(linux)
- Linux下ZooKeeper分布式集群安装教程
- Linux下zookeeper集群安装配置
- Zookeeper安装使用以及linux上的分布集群搭建
- Linux zookeeper集群安装
- linux单机 ZooKeeper集群安装
- linux6.5下安装zooKeeper集群
- linux下安装zookeeper(集群版)
- linux上Zookeeper集群安装及监控
- linux上zookeeper集群的安装、配置和高可用测试
- zookeeper学习记录-04 Zookeeper安装(linux系统,伪集群)
- Redhat-linux下zookeeper单机及集群方式安装启动
- Linux下安装zookeeper以及Zookeeper的集群搭建
- zookeeper集群的Linux安装步骤
- Linux 下 ZooKeeper 分布式集群安装
- Linux下 zookeeper集群安装
- 分布式Web应用----Linux环境下zookeeper集群环境的安装与配置
- linux下zookeeper集群安装配置(3.5.1版)