一 zookeeper的搭建
1.1 上传zkjar包
1.2 搭建配置
1.解压压缩包
[root@localhost export]# tar -zxvf zookeeper-3.7.0-bin.tar.gz
2.创建data文件夹
[root@localhost export]# cd apache-zookeeper-3.7.0-bin/
[root@localhost apache-zookeeper-3.7.0-bin]# ls
bin conf docs lib LICENSE.txt NOTICE.txt README.md README_packaging.md
[root@localhost apache-zookeeper-3.7.0-bin]# pwd
/root/export/apache-zookeeper-3.7.0-bin
[root@localhost apache-zookeeper-3.7.0-bin]# pwd
/root/export/apache-zookeeper-3.7.0-bin
[root@localhost apache-zookee服务器托管网per-服务器托管网3.7.0-bin]# ls
bin conf docs lib LICENSE.txt NOTICE.txt README.md README_packaging.md
[root@localhost apache-zookeeper-3.7.0-bin]# mkdir -p data
[root@localhost apache-zookeeper-3.7.0-bin]# pwd
/root/export/apache-zookeeper-3.7.0-bin
3.修改配置
[root@localhost apache-zookeeper-3.7.0-bin]# ls
bin conf data docs lib LICENSE.txt NOTICE.txt README.md README_packaging.md
[root@localhost apache-zookeeper-3.7.0-bin]# cd conf
[root@localhost conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg
[root@localhost conf]# mv zoo_sample.cfg zoo.cfg
[root@localhost conf]# ls
configuration.xsl log4j.properties zoo.cfg
[root@localhost conf]# pwd
/root/export/apache-zookeeper-3.7.0-bin/conf
4.通过vim修改配置文件夹,将dataDir 修改成刚才所建的data文件夹
5.启动服务
[root@localhost bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /root/export/apache-zookeeper-3.7.0-bin/bin/../conf/zoo.cfg
Starting zookeeper … STARTED
[root@localhost bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /root/export/apache-zookeeper-3.7.0-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone
6.常用命令
./zkServer.sh start
./zkServer.sh status # 查看启动状态
./zkServer.sh stop # 停止
./zkServer.sh restart # 重启
./zkCli.sh # 查看zk客户端
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
文章目录 异常及捕获方法 python模块 python包 安装第三方包 异常及捕获方法 当检测到一个错误时,Python解释器就无法继续执行了,反而出现了一些错误的提示,这就是所谓的“异常”, 也就是我们常说的BUG 例如:以r方式打开一个不存在的文件。 C…