mac上安装zookeeper教程
步骤一:进入/usr/local/software目录,通过wget命令下载zookeeper的压缩包。
cd /usr/local/software
sudo wget https://downloads.apache.org/zookeeper/zookeeper-3.6.0/apache-zookeeper-3.6.0-bin.tar.gz
步骤二:下载完成之后进行解压缩
sudo tar -zxvf apache-zookeeper-3.6.0-bin.tar.gz
步骤三: 删除压缩包,重命名为 zookeeper 目录
sudo rm -rf apache-zookeeper-3.6.0-bin.tar.gz
sudo mv apache-zookeeper-3.6.0-bin/ zookeeper
步骤四:在 /usr/local/software/zookeeper 目录下新建两个文件夹 data 和 log,用于存储zookeeper的数据和日志。
sudo mkdir data
sudo mkdir log
步骤五:将conf目录下的zoo_sample.cfg文件更名为zoo.cfg,简单修改配置文件,自定义设置数据文件目录和日志文件目录
步骤六:启动zookeeper服务,还是在/usr/local/software/zookeeper/bin目录下启动
sudo ./zkServer.sh start