Mac Apache ZooKeeper Configuration

Source: Internet
Author: User
Tags zookeeper administrator password

1. Configuration Preparation Work
    • 1) Configure ZooKeeper preparation work

      • Download related software

        • Apache-zookeeper-v3.4.10.zip

        • ZooKeeper official website

        • ZooKeeper configuration software, password: IXGX.

    • 2) Configuration Considerations

      • Download the relevant software in advance, and the installation directory is best installed in the full English path. If the path has a Chinese name, there may be some inexplicable problems.
    • 3) Sample Configuration environment

      • MacOS 10.11.6
      • MacOS 10.13.3
2, Configuration ZooKeeper
  • 1) Download ZooKeeper

    • Download ZooKeeper on the website.
    • After the download is complete, unzip the download package to the /Library directory and name it ZooKeeper, and other directories are available.
  • 2) Modify directory Permissions

    • Open Terminal, enter the following command

      $ sudo chmod 755 /Library/ZooKeeper/bin/*.sh
      • Press ENTER after the prompt for the password, please enter the Administrator password (computer power-on password, such as no password directly enter).
  • 3) Configure Environment variables

    • Open the terminal and enter the following command to open the .bash_profile file

      $ vim ~/.bash_profile
    • Add a command to set environment variables in this file

      export ZK_HOME=/Library/ZooKeeperexport PATH=$PATH:$ZK_HOME/bin
    • Save and exit after adding, execute the following command in terminal to make the configuration take effect

      $ source ~/.bash_profile
  • 4) Edit the configuration file

    • /Library/ZooKeeper/conf/under Directory, create a new file named zoo.cfg , with the following content

      # zookeeper 中使用的基本时间单位, 毫秒值.tickTime=2000# 数据目录. 可以是任意目录.dataDir=/Users/QianChia/ApacheZooKeeper/data  # log 目录, 同样可以是任意目录. 如果没有设置该参数, 将使用和 #dataDir 相同的设置.dataLogDir=/Users/QianChia/ApacheZooKeeper/logs# 监听 client 连接的端口号clientPort=2181
  • 5) See if the configuration is in effect

    • Start the ZooKeeper process by entering the following command at the terminal

      $ zkServer.sh start
    • If the following occurs, the ZooKeeper Server process that is running in the background is started successfully.

      ZooKeeper JMX enabled by defaultUsing config: /Library/ZooKeeper/bin/../conf/zoo.cfgStarting zookeeper ... STARTED
    • Stop ZooKeeper Process command

      $ zkServer.sh stop

Mac Apache ZooKeeper Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.