您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > educoder平台ZooKeeper之分布式环境搭建
第1关:仲裁模式与伪分布式环境搭建vi/opt/zookeeper-3.4.12/conf/zoo.cfg增加以下内容并保存:server.1=127.0.0.1:2888:3888server.2=127.0.0.1:2889:3889server.3=127.0.0.1:2890:3890退出wqmkdir/opt/zookeeper-3.4.12/tmp回车mkdir/opt/zookeeper-3.4.12/tmp/data回车cp-r/opt/zookeeper-3.4.12/opt/zookeeper-3.4.12-01回车cp-r/opt/zookeeper-3.4.12/opt/zookeeper-3.4.12-02回车cp-r/opt/zookeeaper-3.4.12/opt/zookeeper-3.4.12-03回车echo1/opt/zookeeper-3.4.12-01/tmp/data/myid回车echo2/opt/zookeeper-3.4.12-02/tmp/data/myid回车echo3/opt/zookeeper-3.4.12-03/tmp/data/myid回车vi/opt/zookeeper-3.4.12-01/conf/zoo.cfg第十二行和第十四行修改dataDir=/opt/zookeeper-3.4.12-01/tmp/dataclientPort=2181退出wqvi/opt/zookeeper-3.4.12-02/conf/zoo.cfg第十二行和第十四行修改dataDir=/opt/zookeeper-3.4.12-02/tmp/dataclientPort=2182退出wqvi/opt/zookeeper-3.4.12-03/conf/zoo.cfg第十二行和第十四行修改dataDir=/opt/zookeeper-3.4.12-03/tmp/dataclientPort=2183退出wq/opt/zookeeper-3.4.12-01/bin/zkServer.shstart回车/opt/zookeeper-3.4.12-02/bin/zkServer.shstart回车/opt/zookeeper-3.4.12-03/bin/zkServer.shstart测评——————————————————————————————————第2关:伪分布式体验及分布式安装配置在前一关启动三个服务器节点基础上:zkCli.sh-server127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183回车create/quorum_testquorum_test回车quit测评——————————————————————————————
本文标题:educoder平台ZooKeeper之分布式环境搭建
链接地址:https://www.777doc.com/doc-5242263 .html