zookeeper 安装
1、xftp上传zookeeper压缩包并解压
cd /opt/soft
ls
tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz
mv apache-zookeeper-3.6.3-bin soft/zookeeper363
2、进入解压好的安装包 在conf文件夹下配置环境
cd zookeeper363/
cd conf
ls
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg
修改存储数据路径、添加zookeeper交换数据端口已经选举端口
dataDir=/opt/soft/zookeeper363/data
server.1=192.168.56.XXX:2287:3387
添加存储文件夹
[root@km1 zookeeper]# mkdir data
3、配置环境变量
[root@km1 conf]# cd ..
[root@km1 zookeeper363]# pwd
/opt/soft/zookeeper363
[root@km1 zookeeper363]# vi /etc/profile
export ZOOKEEPER_HOME=/opt/soft/zookeeper363
export PATH=$PATH:$ZOOKEEPER_HOME/bin
刷新环境变量
source /etc/profile
?
4、启动zookeeper
[root@km1 zookeeper363]# cd bin
[root@km1 bin]# ls
README.txt zkCli.cmd zkEnv.cmd zkServer.cmd zkServer.sh
zkCleanup.sh zkCli.sh zkEnv.sh zkServer-initialize.sh
[root@km1 bin]# zkServer.sh start
#[root@km1 bin]# zkServer.sh stop
|