zookeeper 单节点安装
Last updated on November 20, 2024 am
🧙 Questions
安装zookeeper单节点
3.8.0
☄️ Ideas
下载zookeeper安装包
nohup wget https://archive.apache.org/dist/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz >> download_zookeeper.log 2>&1 &
tail -f download_zookeeper.log
解压并创建软连接
sudo mkdir -p /data/zookeeper
sudo chown -R ispong:ispong /data/zookeeper
tar -vzxf apache-zookeeper-3.8.0-bin.tar.gz -C /data/zookeeper
sudo ln -s /data/zookeeper/apache-zookeeper-3.8.0-bin /opt/zookeeper
配置环境变量
sudo vim /etc/profile
export ZOOKEEPER_HOME=/opt/zookeeper
export PATH=$PATH:$ZOOKEEPER_HOME/bin
source /etc/profile
修改配置
mkdir -p /data/zookeeper/data
cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg
vim /opt/zookeeper/conf/zoo.cfg
dataDir=/data/zookeeper/data
启动
zkServer.sh start
jps
# 2184 QuorumPeerMain
查看端口号
sudo netstat -ntpl | grep 2181
查看节点状态
zkServer.sh status
🔗 Links
zookeeper 单节点安装
https://ispong.isxcode.com/hadoop/zookeeper/zookeeper 单节点安装/