Install Dubbo Registration Center (Zookeeper-3.4.6)--single node

Source: Internet
Author: User

Dubbo recommends using zookeeper as the registry for the service.

Registration Center Server (192.168.1.100) configuration, installing zookeeper:
Install the zookeeper on the 192.168.1.100 machine as a registered hub server
1. Set the alias name for the 192.168.1.100 hostname and add it in the/etc/hosts file:
# Zookeeper Servers
192.168.1.100 master-provider-01

2, to http://apache.fayea.com/zookeeper/download zookeeper-3.4.6:
$ wget http://apache.fayea.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz

3, Decompression zookeeper installation package
$ TAR-ZXVF zookeeper-3.4.6.tar.gz

3, Decompression zookeeper installation package:
$ TAR-ZXVF zookeeper-3.4.6.tar.gz

4. Create the following directory under the/home/jqlin/zookeeper-3.4.6 directory:
$ cd/home/jqlin/zookeeper-3.4.6
$ mkdir Data
$ mkdir Logs

5, a copy of the Zoo_sample.cfg file under the zookeeper-3.4.6/conf directory, named Zoo.cfg
$ CP zoo_sample.cfg Zoo.cfg

6. Modify the Zoo.cfg configuration file
Xxxx

7. Create the myID file under Datadir=/home/jqlin/zookeeper-3.4.6/data
Edit the myID file and enter the corresponding number on the corresponding IP machine. As on zookeeper, the contents of the myID file are 1. If the installation is configured only on a single point, then there is only one server.1.
$ VI myID

8. Configuring Zookeeper Environment variables

Jqlin users to modify the Vi/home/jqlin/.bash_profile, add the following:
# Zookeeper Env
Export zookeeper_home=/home/jqlin/zookeeper-3.4.6
Export path= $ZOOKEEPER _home/bin: $PATH

Make the configuration file effective
$ source/home/jqlin/.bash_profile

9. Open Ports 2181, 2888, 3888 to be used in the firewall
Switch to root user rights and execute the following command:
# chkconfig Iptables on
# service Iptables Start

Edit/etc/sysconfig/iptables
# Vi/etc/sysconfig/iptables

Add the following 3 lines:
-A input-m state--state new-m tcp-p TCP--dport 2181-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 2888-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 3888-j ACCEPT

To restart the firewall:
# Service Iptables Restart

To view the firewall port status:
# Service Iptables Status

XXX Firewall Information

10, start and test zookeeper (to use Jqlin user start, do not use root):
(1) Use the Jqlin user to the/home/jqlin/zookeeper-3.4.6/bin directory to execute:
$ zkserver.sh Start

(2) Enter the JPS command to view the process:
$ JPS
1456 Quorumpeermain
1475 Jps
Wherein, Quorumpeermain is the zookeeper process, starts the normal

(3) View status:
$ zkserver.sh Status

(4) View Zookeeper service output information:
Because the service information output file is in/home/jqlin/zookeeper-3.4.6/bin/zookeeper.out
$ tail-500f Zookeeper.out

11. Stop the Zookeeper process:
$ zkserver.sh Stop

12. Configure zookeeper Boot using Jqlin User:
Edit/etc/rc.local file, add:
Su-jqlin-c '/home/jqlin/zookeeper-3.4.6/bin/zkserver.sh start '

Install Dubbo Registration Center (Zookeeper-3.4.6)--single node

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.