9.28 zookeeper安装
Zookeeper 本地安装
2.1 本地模式安装 1)安装前准备 尚硅谷技术之 Zookeeper ————————————————————————————— 更多 Java –大数据 –前端 –python 人工智能资料下载,可百度访问:尚硅谷官网 (1)安装 JDK (2)拷贝 apache-zookeeper-3.5.7-bin.tar.gz 安装包到 Linux 系统下 (3)解压到指定目录 [atguigu@hadoop102 software]$ tar -zxvf apache-zookeeper-3.5.7- bin.tar.gz -C /opt/module/ (4)修改名称 [atguigu@hadoop102 module]$ mv apache-zookeeper-3.5.7 -bin/ zookeeper-3.5.7 2)配置修改 (1)将/opt/module/zookeeper-3.5.7/conf 这个路径下的 zoo_sample.cfg 修改为 zoo.cfg; [atguigu@hadoop102 conf]$ mv zoo_sample.cfg zoo.cfg (2)打开 zoo.cfg 文件,修改 dataDir 路径: [atguigu@hadoop102 zookeeper-3.5.7]$ vim zoo.cfg 修改如下内容: dataDir=/opt/module/zookeeper-3.5.7/zkData (3)在/opt/module/zookeeper-3.5.7/这个目录上创建 zkData 文件夹 [atguigu@hadoop102 zookeeper-3.5.7]$ mkdir zkData 3)操作 Zookeeper (1)启动 Zookeeper [atguigu@hadoop102 zookeeper-3.5.7]$ bin/zkServer.sh start (2)查看进程是否启动 [atguigu@hadoop102 zookeeper-3.5.7]$ jps 4020 Jps 4001 QuorumPeerMain (3)查看状态 [atguigu@hadoop102 zookeeper-3.5.7]$ bin/zkServer.sh status ZooKeeper JMX enabled by default Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg Mode: standalone (4)启动客户端 [atguigu@hadoop102 zookeeper-3.5.7]$ bin/zkCli.sh (5)退出客户端: [zk: localhost:2181(CONNECTED) 0] quit (6)停止 Zookeeper [atguigu@hadoop102 zookeeper-3.5.7]$ bin/zkServer.sh stop