3. Set Up the Configuration Files

There are several configuration files that need to be set up for ZooKeeper.

  • Extract the ZooKeeper configuration files to a temporary directory.

    The files are located in the configuration_files/zookeeper directories where you decompressed the companion files.

  • Modify the configuration files.

    In the respective temporary directories, locate the following files and modify the properties based on your environment. Search for TODO in the files for the properties to replace.

    1. Edit zoo.cfg and modify the following properties:





    2. Edit the hbase-site.xml and modify the following properties:

       <description>Comma separated list of Zookeeper servers (match to what is specified in zoo.cfg but without portnumbers)</description>

  • Copy the configuration files

    1. On all hosts create the config directory:

      rm -r $ZOOKEEPER_CONF_DIR ;
      mkdir -p $ZOOKEEPER_CONF_DIR ;
    2. Copy all the ZooKeeper configuration files to the $ZOOKEEPER_CONF_DIR directory.

    3. Set appropriate permissions:

      chmod a+x $ZOOKEEPER_CONF_DIR/;
      chmod -R 755 $ZOOKEEPER_CONF_DIR/../


  • $ZOOKEEPER_CONF_DIR is the directory to store the ZooKeeper configuration files. For example, /etc/zookeeper/conf.

  • $ZOOKEEPER_USER is the user owning the ZooKeeper services. For example, zookeeper.

loading table of contents...