ZooKeeper concept and environment deployment. MD

Deploy

  • apt-get install openjdk-8-jre
  • cd /opt< /li>
  • wget http://mirror.bit.edu.cn/apache/zookeeper/stable/zookeeper-3.4.10.tar.gz
  • tar -zxvf zookeeper-3.4.10. tar.gz
  • mv zookeeper-3.4.10 zookeeper
  • cd zookeeper/conf/
  • cp zoo_sample.cfg zoo.cfg
  • mkdir /var/zookeeper
  • Modify zoo.cfg (stand-alone)

    dataDir=/var/zookeeper

  • < p>Increase environment variables

    vi ~/.bashrc
    export PATH=/opt/zookeeper/bin:$PATH
    source ~/.bashrc

  • Start

    zkServer.sh start

  • Status

    < blockquote>

    zkServer.sh status

  • Access

    zkCli.sh -server 127.0.0.1:2181

[zk: 127.0.0.1:2181(CONNECTED) 1] ls[zk: 127.0.0.1:2181(CONNECTED) 2] create /k1 v1Created /k1[zk: 127.0.0.1:2181(CONNECTED) 3] get /k1v1cZxid = 0x2ctime = Sat Oct 14 19:05:40 CST 2017mZxid = 0x2mtime = Sat Oct 14 19:05:40 CST 2017pZxid = 0x2cversion = 0dataVersion = 0aclVersion = 0ephemeralOwner = 0x0dataLength = 2numChildren = 0

Other

    < li>As long as more than half of the nodes can be accessed, the cluster is normal
  • var/zookeeper/zookeeper_server.out View error log

Deploy

  • apt-get install openjdk-8-jre
  • cd /opt
  • wget http://mirror. bit.edu.cn/apache/zookeeper/stable/zookeeper-3.4.10.tar.gz
  • tar -zxvf zookeeper-3.4.10.tar.gz
  • mv zookeeper-3.4.10 zookeeper
  • cd zookeeper/conf/
  • cp zoo_sample.cfg zoo.cfg
  • mkdir /var/zookeeper
  • li>

  • Modify zoo.cfg (stand-alone)

    dataDir=/var/zookeeper

  • Add environment variables

  • p>

    vi ~/.bashrc
    export PATH=/opt/zookeeper/bin:$PATH
    source ~/.bashrc

  • Start

    zkServer.sh start

  • Status

    zkServer. sh status

  • Access

    zkCli.sh -server 127.0.0.1:2181

    < /li>

[zk: 127.0.0.1:2181(CONNECTED) 1] ls[zk: 127.0.0.1:2181(CONNECTED) 2] create /k1 v1Created /k1[zk : 127.0.0.1:2181(CONNECTED) 3] get /k1v1cZxid = 0x2ctime = Sat Oct 14 19:05:40 CST 2017mZxid = 0x2mtime = Sa t Oct 14 19:05:40 CST 2017pZxid = 0x2cversion = 0dataVersion = 0aclVersion = 0ephemeralOwner = 0x0dataLength = 2numChildren = 0

Other

    < li>As long as more than half of the nodes can be accessed, the cluster is normal
  • var/zookeeper/zookeeper_server.out View error log

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4764 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.