Youtube channel (Reverse Engineer source code) ZooKeeper :: for Enterprise Architect's powerful code engineering features is the ability to Reverse Engineer source code into a UML model.(Reverse Engineer source code) ZooKeeper :
First, you will need to update your system with the latest version. You can do this by running the following command:
Install Java
Zookeeper is written in Java. So, you will need to install Java to your system. By default, the latest version of Java is not available in the Ubuntu 18.04 default repository. So, add the Java repository with the following command:
Next, update the repository and install Java with the following command:
Once the Java has been installed, you can check the Java version with the following command:
You should see the following output:
Once you have finished, you can proceed to the next step.
Create a ZooKeeper User
Next, you will need to create a zookeeper user to run zookeeper service.
First, create a zookeeper user with the following command:
Next, set a password with the following command:
Next, add the zookeeper user to the sudo group so it can run commands in a privileged mode:
After creating user, you can procced to install ZooKeeper.
Install ZooKeeper
ZooKeeper stores all configuration and state data to disk. So, you will need to create a directory structure for ZooKeeper with the following command:
Next, give proper ownership to the /data directory with the following command:
Next, change the directory to the /opt and download the latest version of ZooKeeper with the following command:
Next, extract the downloaded file with the following command:
Next, rename the extracted binary with the following command:
Next, give ownership to the ZooKeeper user with the following command:
Configure ZooKeeper
Next, you will need to create a configuration file for ZooKeeper. You can do it with the following command:
Add the following lines:
Save and close the file, when you are finished.
Next, start the ZooKeeper service with the following command:
You should see the following output:
You can connect to the local ZooKeeper server with the following command:
Once you have connected successfully, you should see the following output:
Now, type help on the prompt, you should see the a list of commands that you can execute from the client.
Now, type quit to exit from the connected session.
You can stop the ZooKeeper with the following command:
You should see the following output:
Create a Systemd Service file for ZooKeeper
Next, you will need to create a systemd service file to manage ZooKeeper service. You can do it with the following command:
Add the following lines:
Save and close the file, when you are finished.
Next, reload the systemd daemon, start the ZooKeeper service and enable it to start on boot time with the following command:
You can check the status of ZooKeeper service with the following command:
You should see the following output:
Congratulations! you have successfully installed and configured ZooKeeper single node cluster on Ubuntu 18.04 server. You can now deploy multi-node ZooKeeper cluster for production. Feel free to ask me if you have any questions.
Thanks for reading
Other resources
Enterprise Architect's powerful code engineering features is the ability to Reverse Engineer source code into a UML model. If you are interested in how to (Reverse Engineer source code) zookeeper-release-HDP for Architect: Архитектура ZooKeeper : (Reverse Engineer source code) ZooKeeper :
Originally published October 28, 2019
Latest update October 27, 2019