Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Zookeeper cluster deployment     - How do I upgrade to Ubuntu 15.04 (Beta) (Linux)

- CentOS 5.11 Open VNC access (Linux)

- Linux + Apache + PHP + Oracle based environment to build (Server)

- Asynchronous communication mechanism between the Android source code analysis thread (Programming)

- To get Java class / jar package path (Programming)

- Sublime Text 3 practical functions and shortcut keys used to collect (Linux)

- grep regular expression (Linux)

- Linux LVM space expansion Demo (Linux)

- CentOS 7 repair MBR and GRUB (Linux)

- CentOS installation pycurl (Linux)

- High-performance JavaScript reflows and repaints (Programming)

- C language to view various types of data size (Programming)

- Storm basic framework for analysis (Programming)

- Iptables application layer plug (Linux)

- How to use Quagga BGP (Border Gateway Protocol) router to filter BGP routing (Linux)

- How to Install Puppet in the Ubuntu 15.04 (Server)

- C ++ containers (Programming)

- Radius server setup under CentOS (Server)

- Linux set the maximum number of open files nofile and nr_open, file-max Description (Linux)

- Syncthing: Private Security Synchronization tool to synchronize files between computers / folder (Linux)

 
         
  Zookeeper cluster deployment
     
  Add Date : 2018-11-21      
         
         
         
 

I. Preparatory work before deployment

1. Each host can guarantee normal communication, preferably in the same network segment.

2. Modify the host file, and add the mapping IP host name. Methods to modify the / etc / hosts and etc / hostname file, different Linux distributions approach is not necessarily the same.

3. Turn off the firewall or open ports to use

II. Deployment Zookeeper cluster

1. Zookeeper visit the official website to download the installation package, and extract.

tar -xvzf zookeeper-3.4.6.tar.gz

2. Create a data directory

Execute the following command to create the data directory:

mkdir / usr / zookeeper / data

Execute the following command to create the log directory:

mkdir / usr / zookeeper / data / log

execute the following command to create myid file and write ID:

echo 1 > / usr / zookeeper / data / myid

3. Modify the configuration

Run the following command to edit zoo.cfg file:

cd zookeeper-3.4.6 / conf / & & mv zoo_sample.cfg zoo.cfg & & vi zoo.cfg

Modify configuration is as follows:

dataDir = / usr / zookeeper / data

dataLogDir = / usr / zookeeper / data / log

autopurge.snapRetainCount = 3

autopurge.purgeInterval = 1

In the last added Zookeeper cluster nodes address:

server.1 = node1: 2888: 3888

server.2 = node2: 2888: 3888

server.3 = node3: 2888: 3888

4. Copy configuration files to other nodes

scp -r zookeeper-3.4.6 / node2: / usr /

It should be noted that each node myid is not the same.

III. Start Zookeeper cluster

execute the following command to start Zookeeper Zookeeper service nodes in the cluster:

zookeeper-3.4.6 / bin / zkServer.sh start

Zookeeper execute the following command to view the status of each node in the cluster:

zookeeper-3.4.6 / bin / zkServer.sh status

You can see the node1 node follewer node

IV. HA validation failure is automatically transferred if it works

Zookeeper process using jps command

Use the command kill -9 2432 kill leader process, and then view the status of each node Zookeeper, if there is a leader of the verification handy

     
         
         
         
  More:      
 
- Java interface (Programming)
- Linux instructions and examples GPG encryption and decryption (Linux)
- The mv command to move the directory two cases under Linux (Linux)
- MongoDB simple replication configuration (Database)
- Java Timer (regular calling, to achieve a fixed time to perform) (Programming)
- Linux, set and view environment variables (Linux)
- Install the Red Hat Container Development Kit on OSX (Server)
- Ubuntu 14.04 / 14.10 how to install Mate 1.10.0 (Linux)
- Fedora 22 installation and configuration optimization (Linux)
- Android Studio Clear Project or Rebuild Project Error (Linux)
- Virtualbox virtual machine can not copy CentOS Network (Linux)
- Google open source TCP team repaired the Linux kernel TCP flaw (Linux)
- Ubuntu the ARP (arptables) (Linux)
- Linux environment installation of rvm and ruby (Linux)
- Customize the output format in Linux history (Linux)
- Why learn and use C language (Programming)
- Wireshark basic introduction and learning TCP three-way handshake (Linux)
- Sysdig: system troubleshooting tool (Linux)
- Java learning problems encountered (Programming)
- Comparison of sorting algorithms (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.