linux in the installation and configuration zookeeper

1.
1.1 create four virtual machines and starts:
Here Insert Picture Description
1.2 centos7 establish a file folder placed inside four sessions, respectively note1, note2, note3 in the shell, Note4
Here Insert Picture Description
1.3 successfully established
Here Insert Picture Description
2. Start Configuration
2.1: Modify the host name: hostnamectl set -hostname host name --static (permanent)
reboot: reboot
View hostname: hostname
Here Insert Picture Description
2.2 firewall turned off
when entering service iptables stop, the following error appears:
Here Insert Picture Description
then you need to install a iptables-service:

systemctl stop firewalld 
systemctl  mask firewalld 
yum install iptables-services(安装)
systemctl stop iptables(开机关闭)
service iptables save(保存)

2.3: Set up sync button
Here Insert Picture Description
Here Insert Picture Description
2.4 zookeeper create folders
Here Insert Picture Description
Here Insert Picture Description
2.5 Click xftp6, zookeeper-bin to open the file you want to pass,
2.6 zookeeper Download:
https://mirrors.cloud.tencent.com/apache/zookeeper/zookeeper-3.5.7/
2.7note1, note2, note3, are using this method to upload

Here Insert Picture Description
2.8: Extract: tar--zxvf the Apache ZooKeeper-3.5.7-bin.tar.gz
Here Insert Picture Description
2.9 rename:
mv the Apache-3.5.7-bin-ZooKeeper ZooKeeper the Apache- Here Insert Picture Description
delete tar package
Here Insert Picture Description
entering data, create and enter myid, modify the contents inside
Here Insert Picture Description
myid to write 0,1,2 respectively. i, modify; esc exit: wq forced to save and exit!
Here Insert Picture Description
enter zookeeper-the Apache
Here Insert Picture Description
3. Modify zookeeper profile:
3.1: enter conf`` [root @ note1 apache-zookeeper ] # cd conf / `` `
copy zoo_sample.cfg, to zoo.cfg. [root@note1 conf]# cp zoo_sample.cfg zoo.cfg
Modify the configuration file zoo.cfg. [root@note1 conf]# vim zoo.cfg
zoo.cfg profile:
dataDir = / Data / ZooKeeper / Data
server.0 = Note1: 2888: 3888
server.1 = Note2: 2888: 3888
server.2=note3:2888:3888

# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/data/zookeeper/data
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.0=note1:2888:3888
server.1=note2:2888:3888
server.2=note3:2888:3888

3.2: Start the zookeeper[root@note1 apache-zookeeper]# bin/zkServer.sh start

Here Insert Picture Description
View status: [root@note1 apache-zookeeper]# bin/zkServer.sh status
JPS start: jpsHere Insert Picture Description
3.3 (Firefox) to access note1 on the browser: 8080

Here Insert Picture Description
3.4
Here Insert Picture Description
complete configuration zookeeper
3.4:
View log vim logs/zookeeper-root-server-note1.out
distribution file:scp -r apache-zookeeper/root@note2$pwd scp -r apache-zookeeper/root@note3$pwd

Published 16 original articles · won praise 9 · views 279

Guess you like

Origin blog.csdn.net/XIAOMO__/article/details/104802404