As a standardized distributed coordination component, zookeeper has been used more and more in various big data platforms. In zookeeper, some state information is often stored in the same tree structure as the Linux file system, and Node-zk-browser is an open source tool that can graphically view zookeeper tree state information. The following mainly from 2 aspects to record how to install Node-zk-browser.
Installation of Nodejs
Download Nodejs,wget Https://github.com/joyent/node/archive/v0.8.14.zip
Unzip, unzip V0.8.14.zip
Compiling Nodejs
Set the. Bash_profile environment variable
Export path= $PATH:/usr/local/nodejs/nodejs-0.8.14/binexport node_path=/usr/local/nodejs/nodejs-0.8.14:/usr/local /nodejs/nodejs-0.8.14/lib/node_modules
var http = require ("http"); Http.createserver (function (request, response) {Response.writehead (), {"Content-type": " Text/plain "}); Response.Write ("Hello, nodejs!"); Response.End (); }). Listen (5000);
Run Hello.js,node hello.js
In the browser, observe the $IP: 5000, whether there is output
Node-zk-browser
Download Node-zk-browser,git Clone Https://github.com/killme2008/node-zk-browser.git
Install dependent packages
Installing EJS,NPM install-d Ejs
Install EXPRESS,NPM install-d [email protected]
Installing EXPRESS-NAMESPACE,NPM install-d Express-namespace
Installing Zookeeper,npm-d Zookeeper
Modify the Zookeeper settings to change the zk_host in start.sh to the actual ZK address
Verify, in the browser, observe $IP: 3000, whether there is output
Node-zk-browser installation Configuration