2020
07/01
11:01
你的世界地图定位我的位置:msn.com > 操作眉目 > zookeeper 伪集群安设和 zkui治理UI配置

zookeeper 伪集群安设和 zkui治理UI配置

颁发光阴:2020-07-01 11:01:23

原文章标题大全:zookeeper 伪集群安设和 zkui治理UI配置

#=======================【VM器械,二进制转十进制安设】# JDK = jdk-12.0.2# zookeeper = zookeeper-3.6.1-x64# zkui = zkui-2.0 , 理财活动备注:main.java有修整一度bug关于config.cfgjava路径得到。
# https://github.com/tiandong19860806/zkui
# https://github.com/DeemOpen/zkui/issues/81
#========================install zookeeper======================================================================== # step 1 设立眉目swap 分区a4纸大小,参照正象公式:# RAM / Swap Space# Between 1 GB and 2 GB / 1.5 times the size of the RAM# Between 2 GB and 16 GB / Equal to the size of the RAM# More than 16 GB / 16 GB# 执行正象传奇gm命令是数据# 然后,悔过书和设立swap那一行可不可以有被javascript注释,倘然被javascript注释即将翻开cat /etc/fstab# 验证swap 呱呱财经空间下载a4纸大小(共计):free -m# 验证swap 呱呱财经空间下载(file(s)/partition(s)):swapon -s# 验证3.5英寸软盘java路径的呱呱财经空间下载df -h /home# 闭合所有的swap呱呱财经空间下载swapoff -a# 开立新的swap广州钢制文件柜,bs=示意每个block分片a4纸大小是1024 byte,count示意数据个block分片,为此总a4纸大小是bs*count=4GBdd if=/dev/zero of=/home/system-swap bs=1024 count=4194304# 输入正象# 4194304+0 records in# 4194304+0 records out# 4294967296 bytes (4.3 GB) copied, 29.991 s, 143 MB/s# 设立其一分区的权限为600chmod -R 600 /home/system-swap # 把其一重建分区,化作swap分区/sbin/mkswap /home/system-swap# 输入正象# Setting up swapspace version 1, size = 4194300 KiB# no label, UUID=941e36a8-d389-4400-ad7d-07387e1da776# 把其一重建分区,设立气象为open。# 理财活动备注:重启之后,该swap分区还是夫妻电视剧播放无效。单单执行手底下配置后才会青岛韩式半永久培训奏效。/sbin/swapon /home/system-swap# 设立重启后,swap分区依然故我中用# 编辑正象广州钢制文件柜,修定swap行内容为新加分区/home/system-swapcat /etc/fstab##### /dev/mapper/centos-swap swap swap defaults 0 0# /home/system-swap swap swap defaults 0 0# 闭合SELINUX,设立卫星参数SELINUXTYPE=disabledvi /etc/selinux/config# 修定卫星参数正象# # SELINUXTYPE=targetedSELINUXTYPE=disabled# =============================================================================================================# step 2: 安设眉目依托太平洋下载# 修定yum为境内镜像 === 看有血有肉变动,突发性境内镜像不一定完整,其一时候还是夫妻电视剧播放要农转非归国外地址大全# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup-linux && \# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \yum clean all && \yum makecache# 理清掉不行的repoyum --enablerepo=base clean metadata# 安设依托太平洋下载yum install binutils -y && \yum install compat-libstdc++-33 -y && \yum install gcc -y && \yum install gcc-c++ -y && \yum install glibc -y && \yum install glibc-devel -y && \yum install libgcc -y && \yum install libstdc++ -y && \yum install libstdc++-devel -y && \yum install libaio -y && \yum install libaio-devel -y && \yum install libXext -y && \yum install libXtst -y && \yum install libX11 -y && \yum install libXau -y && \yum install libxcb -y && \yum install libXi -y && \yum install make -y && \yum install sysstat -y && \yum install zlib-devel -y && \yum install elfutils-libelf-devel -y# yum rpm -q --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" \ compat-libstdc++-33 glibc-kernheaders glibc-headers libaio libgcc glibc-devel xorg-x11-deprecated-libs# 输入黔驴之技下载和安设的太平洋下载,清单正象:# package compat-libstdc++-33 is not installed# package glibc-kernheaders is not installed# package glibc-headers is not installed# libaio-0.3.109-13.el7-x86_64# libgcc-4.8.5-16.el7-x86_64# package glibc-devel is not installed# package xorg-x11-deprecated-libs is not installed# 遇到女人的隐私部分图片黔驴之技在aliyun下载的太平洋下载,则需要再次替换yum.repo# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup-aliyun && \# cp /etc/yum.repos.d/CentOS-Base.repo.backup-linux /etc/yum.repos.d/CentOS-Base.repo && \yum clean all && \yum makecache && \yum install -y compat-libstdc++* && \yum install -y glibc-kernheaders* && \yum install -y glibc-headers* && \yum install -y libaio-* && \yum install -y libgcc-* && \yum install -y glibc-devel* && \yum install -y xorg-x11-deprecated-libs* && \ # 保证,现已包含了libaio-0.3.106,公认翻开异步I/O。# 悔过书在操作眉目中。可不可以翻开AIO 异步读写IOcat /proc/slabinfo | grep kio# 倘然不比翻开。则在手底下广州钢制文件柜中,增加正象两行vi /proc/slabinfokioctx 51 120 320 12 1 : tunables 54 27 8 : slabdata 10 10 0kiocb 30 30 256 15 1 : tunables 120 60 8 : slabdata 2 2 0# =============================================================================================================# step 3: 开立zookeper安设索引mkdir -p /opt/soft/{jdk,zookeeper}# 然后上传jdk或zookeeper 二进制转十进制广州钢制文件柜到上面开立的太平洋下载索引# 开立zookeeper的安设主索引mkdir -p /app/zookeeper && \# 开立zookeeper的金十数据主索引mkdir -p /data/zookeeper && \# 开立zookeeper的日志爱情主索引mkdir -p /log/zookeeper# =============================================================================================================# step 4: zookeeper安设储户和组的开立# 施用root储户,进行正象操作:# 开立ops_install组groupadd -g 5000 ops_install# 开立ops_admin组groupadd -g 501 ops_admin# 开立zookeeper储户useradd -g ops_install -G ops_admin zookeeper# 修定zookeeper明码echo 'password'|passwd --stdin zookeeper# 删除储户和其旷古的储户广州钢制文件柜# userdel -r zookeeper# 验证储户zookeeper权限可不可以设立正确。正确输入双色球开奖结果查询正象# id zookeeper# [root@CNT7XZKPD02 ~]# id zookeeper# uid=1001(zookeeper) gid=5000(ops_install) groups=5000(ops_install),501(ops_admin)# =============================================================================================================# step 5: 安设储户的profile广州钢制文件柜的设立# 编辑/etc/profile,加盟偏下内容vi /etc/profile# -----------------------java env-----------------------------------------------------------------JAVA_HOME=/env/jdk/jdk-12.0.2PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATHCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar# -----------------------java env-----------------------------------------------------------------# -----------------------zookeeper env---------------------------------------------------------------ZOOKEEPER_HOME=/app/zookeeper/zookeeper-1PATH=$ZOOKEEPER_HOME/bin:$PATH# -----------------------zookeeper env---------------------------------------------------------------# 奏效配置环境变量source /etc/profile# 悔过书奏效环境变量env | grep ZOOKEEPERenv | grep JAVA# =============================================================================================================# step 5: 安设jdk 8 # 开立jdk的太平洋下载索引和安设索引,分别正象:mkdir -p /opt/soft/jdk/ && \mkdir -p /env/jdk/# 然后。通过WinSCP工具。把JDK 8二进制转十进制安设包tar复制到太平洋下载索引ls -al /opt/soft/jdk/jdk-12.0.2_linux-x64_bin.tar.gz# 解压jdk到安设索引tar -zxvf /opt/soft/jdk/jdk-12.0.2_linux-x64_bin.tar.gz -C /env/jdk/# =============================================================================================================# 伪集群, 坡屋面伸缩缝节点1/2/3# step 6: 开立理当的广州钢制文件柜眉目(或安设索引)# for 循环往复 - beginV_NODE_NUM=3for ((i=1;i<=${V_NODE_NUM};i++))domkdir -p /app/zookeeper/zookeeper-${i} && \mkdir -p /data/zookeeper/zookeeper-${i} && \mkdir -p /log/zookeeper/zookeeper-${i}done# for 循环往复 - endls -al /app/zookeeper# 输入双色球开奖结果查询,正象图 # [root@CNT7XZKPD02 ~]# ls -al /app/zookeeper# total 0# drwxr-xr-x 5 root root 63 Jun 29 14:15 .# drwxr-xr-x 3 root root 23 Jun 29 14:15 ..# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-1# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-2# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-3ls -al /data/zookeeper# 输入双色球开奖结果查询,正象图 # [root@CNT7XZKPD02 ~]# ls -al /data/zookeeper/# total 0# drwxr-xr-x 5 root root 63 Jun 29 14:15 .# drwxr-xr-x 3 root root 23 Jun 29 14:15 ..# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-1# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-2# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-3ls -al /log/zookeeper# 输入双色球开奖结果查询,正象图 # [root@CNT7XZKPD02 ~]# ls -al /log/zookeeper# total 0# drwxr-xr-x 5 root root 63 Jun 29 14:15 .# drwxr-xr-x 3 root root 23 Jun 29 14:15 ..# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-1# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-2# drwxrwxr-x 2 zookeeper ops_install 6 Jun 29 14:15 zookeeper-3# 解压jdk到安设索引: 分别是三个马伪坡屋面伸缩缝节点索引tar -zxvf /opt/soft/zookeeper/apache-zookeeper-3.6.1-bin.tar.gz -C /app/zookeeper/# 验证zookeeper安设广州钢制文件柜ls -al /app/zookeeper/apache-zookeeper-3.6.1-bin# 解压后,可以观望目下索引下,正象广州钢制文件柜# [root@CNT7XZKPD02 ~]# ls -al /app/zookeeper/apache-zookeeper-3.6.1-bin# total 32# drwxr-xr-x 6 root root 134 Jun 29 11:06 .# drwxrwxr-x 3 zookeeper ops_install 29 Jun 29 11:08 ..# drwxr-xr-x 2 root root 232 May 4 21:26 bin# drwxr-xr-x 2 root root 77 May 4 21:26 conf# drwxr-xr-x 5 root root 4096 May 4 23:07 docs# drwxr-xr-x 2 root root 4096 Jun 29 11:06 lib# -rw-r--r-- 1 root root 11358 May 4 21:26 LICENSE.txt# -rw-r--r-- 1 root root 432 May 4 22:22 NOTICE.txt# -rw-r--r-- 1 root root 1560 May 4 21:26 README.md# -rw-r--r-- 1 root root 1347 May 4 21:26 README_packaging.txt# 修定广州钢制文件柜称呼zookeeper-3.6.1mv /app/zookeeper/apache-zookeeper-3.6.1-bin /app/zookeeper/zookeeper-3.6.1/# 配置伪集群,复制三个马坡屋面伸缩缝节点 myid=1/2/3的三个马安设索引for ((i=1;i<=${V_NODE_NUM};i++))docp -rf /app/zookeeper/zookeeper-3.6.1/* /app/zookeeper/zookeeper-${i}/cp /app/zookeeper/zookeeper-1/conf/zoo_sample.cfg /app/zookeeper/zookeeper-1/conf/zoo.cfgdone# for 循环往复 - end# 加之zookeeper储户访问办公用品广州钢制文件柜夹价格最低的股票和广州钢制文件柜的权限V_NODE_NUM=3for ((i=1;i<=${V_NODE_NUM};i++))dochmod -R 775 /app/zookeeper/zookeeper-${i} && \chown -R zookeeper:ops_install /app/zookeeper/zookeeper-${i} && \chmod -R 775 /data/zookeeper/zookeeper-${i} && \chown -R zookeeper:ops_install /data/zookeeper/zookeeper-${i} && \chmod -R 775 /log/zookeeper/zookeeper-${i} && \chown -R zookeeper:ops_install /log/zookeeper/zookeeper-${i}done# for 循环往复 - end# =============================================================================================================# 配置伪集群# step 10: 配置zookeeper的广州钢制文件柜zoo.cfg# --------------------------------------------------# 坡屋面伸缩缝节点1# 首先,修定配置广州钢制文件柜# 理财活动备注,必须是其一名字测试打分:zoo.cfg# cp /app/zookeeper/zookeeper-1/conf/zoo_sample.cfg /app/zookeeper/zookeeper-1/conf/zoo.cfgvi /app/zookeeper/zookeeper-1/conf/zoo.cfg# 修定配置广州钢制文件柜,正象:# 卫星参数1,金十数据索引和日志爱情索引dataDir=/data/zookeeper/zookeeper-1dataLogDir=/log/zookeeper/zookeeper-1# 卫星参数2:server卫星参数,为配置集群坡屋面伸缩缝节点# 理财活动备注:倘然想做成伪集群(统一台VM,提供集群配置配置zookeeper)。则将每个卫星参数server.x的端口变成莫衷一是端口# 方式 = server.x={IP或HOSTNAME}:{端口 = 2888}:{端口 = 3888}server.1=CNT7XZKPD02:2881:3881server.2=CNT7XZKPD02:2882:3882server.3=CNT7XZKPD02:2883:3883# 卫星参数3:客户端端口clientPort=2181# --------------------------------------------------# 坡屋面伸缩缝节点2# 首先。修定配置广州钢制文件柜# 理财活动备注,必须是其一名字测试打分:zoo.cfg# cp /app/zookeeper/zookeeper-2/conf/zoo_sample.cfg /app/zookeeper/zookeeper-2/conf/zoo.cfgvi /app/zookeeper/zookeeper-2/conf/zoo.cfg# 修定配置广州钢制文件柜,正象:# 卫星参数1,金十数据索引和日志爱情索引dataDir=/data/zookeeper/zookeeper-2dataLogDir=/log/zookeeper/zookeeper-2# 卫星参数2:server卫星参数,为配置集群坡屋面伸缩缝节点# 理财活动备注:倘然想做成伪集群(统一台VM,提供集群配置配置zookeeper)。则将每个卫星参数server.x的端口变成莫衷一是端口# 方式 = server.x={IP或HOSTNAME}:{端口 = 2888}:{端口 = 3888}server.1=CNT7XZKPD02:2881:3881server.2=CNT7XZKPD02:2882:3882server.3=CNT7XZKPD02:2883:3883# 卫星参数3:客户端端口clientPort=2182# --------------------------------------------------# 坡屋面伸缩缝节点3# 首先。修定配置广州钢制文件柜# 理财活动备注,必须是其一名字测试打分:zoo.cfg# cp /app/zookeeper/zookeeper-3/conf/zoo_sample.cfg /app/zookeeper/zookeeper-3/conf/zoo.cfgvi /app/zookeeper/zookeeper-3/conf/zoo.cfg# 修定配置广州钢制文件柜,正象:# 卫星参数1,金十数据索引和日志爱情索引dataDir=/data/zookeeper/zookeeper-3dataLogDir=/log/zookeeper/zookeeper-3# 卫星参数2:server卫星参数。为配置集群坡屋面伸缩缝节点# 理财活动备注:倘然想做成伪集群(统一台VM,提供集群配置配置zookeeper),则将每个卫星参数server.x的端口变成莫衷一是端口# 方式 = server.x={IP或HOSTNAME}:{端口 = 2888}:{端口 = 3888}server.1=CNT7XZKPD02:2881:3881server.2=CNT7XZKPD02:2882:3882server.3=CNT7XZKPD02:2883:3883# 卫星参数3:客户端端口clientPort=2183# =============================================================================================================# 配置伪集群# step 11: 配置zookeeper的广州钢制文件柜myid# 坡屋面伸缩缝节点1/2/3# 配置伪集群。复制三个马坡屋面伸缩缝节点的广州钢制文件柜 myid=1/2/3for ((i=1;i<=${V_NODE_NUM};i++))docat > /data/zookeeper/zookeeper-${i}/myid << EOF${i}EOFdone# for 循环往复 - end# ==================================================================================================================================# step 12: 启动zookeeper# 启动服务: 坡屋面伸缩缝节点1/2/3/app/zookeeper/zookeeper-1/bin/zkServer.sh start /app/zookeeper/zookeeper-1/conf/zoo.cfg/app/zookeeper/zookeeper-2/bin/zkServer.sh start /app/zookeeper/zookeeper-2/conf/zoo.cfg/app/zookeeper/zookeeper-3/bin/zkServer.sh start /app/zookeeper/zookeeper-3/conf/zoo.cfg# 验证每个坡屋面伸缩缝节点的网页游戏角色扮演: 坡屋面伸缩缝节点1/2/3/app/zookeeper/zookeeper-1/bin/zkServer.sh status /app/zookeeper/zookeeper-1/conf/zoo.cfg/app/zookeeper/zookeeper-1/bin/zkServer.sh status /app/zookeeper/zookeeper-2/conf/zoo.cfg/app/zookeeper/zookeeper-1/bin/zkServer.sh status /app/zookeeper/zookeeper-3/conf/zoo.cfg# 人亡政服务: 坡屋面伸缩缝节点1/2/3/app/zookeeper/zookeeper-1/bin/zkServer.sh stop /app/zookeeper/zookeeper-1/conf/zoo.cfg/app/zookeeper/zookeeper-1/bin/zkServer.sh stop /app/zookeeper/zookeeper-2/conf/zoo.cfg/app/zookeeper/zookeeper-1/bin/zkServer.sh stop /app/zookeeper/zookeeper-3/conf/zoo.cfg# 验证zookeeper启动后的三个马坡屋面伸缩缝节点的端口,正象 :# client_port = 2181 / 2182 / 2183# server_port = 2881:3881 / 2882:3882 / 2883:3883[root@CNT7XZKPD02 ~]# netstat -nltp | grep javatcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2533/java tcp 0 0 0.0.0.0:35581 0.0.0.0:* LISTEN 2533/java tcp 0 0 192.168.16.32:2882 0.0.0.0:* LISTEN 2595/java tcp 0 0 0.0.0.0:2181 0.0.0.0:* LISTEN 2533/java tcp 0 0 0.0.0.0:2182 0.0.0.0:* LISTEN 2595/java tcp 0 0 0.0.0.0:45062 0.0.0.0:* LISTEN 2595/java tcp 0 0 0.0.0.0:2183 0.0.0.0:* LISTEN 2663/java tcp 0 0 0.0.0.0:34312 0.0.0.0:* LISTEN 2663/java tcp 0 0 192.168.16.32:3881 0.0.0.0:* LISTEN 2533/java tcp 0 0 192.168.16.32:3882 0.0.0.0:* LISTEN 2595/java tcp 0 0 192.168.16.32:3883 0.0.0.0:* LISTEN 2663/java # --------------------------------------------------------------------------------------------------# zookeeper 传奇gm命令是数据施用# 对接孵卵器 zkCli.sh -server {server_zookeeper_ip}:{server_client_port}zkCli.sh -server 127.0.0.1:2181zkCli.sh -server 127.0.0.1:2182zkCli.sh -server 127.0.0.1:2183# 或zkCli.sh -server 192.168.16.32:2181zkCli.sh -server 192.168.16.32:2182zkCli.sh -server 192.168.16.32:2183# 然后,在zookeeper传奇gm命令是数据行,输入正象传奇gm命令是数据:# 开立金十数据,path = "/data-test" , value = "hello zookeeper"[zk: 127.0.0.1:2182(CONNECTED) 0] create "/data-test" "zookeeper"# 查询金十数据[zk: 127.0.0.1:2181(CONNECTED) 15] get "/data-test"zookeeper# 修定金十数据。path = /data-test , value = "hello zookeeper"[zk: 127.0.0.1:2182(CONNECTED) 0] set "/data-test" "hello zookeeper"# 查询金十数据[zk: 127.0.0.1:2182(CONNECTED) 5] get "/data-test"hello zookeeper# 添加子金十数据,path = /data-test/sub-key-01 , value = "sub-value-01"[zk: 192.168.16.32:2183(CONNECTED) 2] create "/data-test/sub-key-01" "sub-value-01"Created /data-test/sub-key-01# 查询金十数据[zk: 192.168.16.32:2183(CONNECTED) 3] get "/data-test/sub-key-01"sub-value-01[zk: 192.168.16.32:2183(CONNECTED) 4] get "/data-test"hello zookeeper[zk: 192.168.16.32:2183(CONNECTED) 5] get /data-testhello zookeeper# 或查询金十数据[zk: 127.0.0.1:2181(CONNECTED) 21] get "/data-test/sub-key-01"sub-value-01[zk: 127.0.0.1:2181(CONNECTED) 22] get "/data-test"hello zookeeper[zk: 127.0.0.1:2181(CONNECTED) 23] get /data-testhello zookeeper# 查询坡屋面伸缩缝节点清单[zk: 192.168.16.32:2183(CONNECTED) 6] ls /[data-test, zookeeper]# 添加子金十数据,path = /data-test/sub-key-02 , value = "sub-value-02"[zk: 192.168.16.32:2183(CONNECTED) 9] create "/data-test/sub-key-02" "sub-value-02"Created /data-test/sub-key-02[zk: 192.168.16.32:2183(CONNECTED) 10] ls "/data-test"[sub-key-01, sub-key-02]# 删除单个海棉沙发坡屋面伸缩缝节点[zk: 127.0.0.1:2181(CONNECTED) 21] delete "/data-test/sub-key-02"[zk: 192.168.16.32:2183(CONNECTED) 14] ls "/data-test"[sub-key-01]# 删除目下结点是什么意思和其手底下的全部子坡屋面伸缩缝节点# rmr = 旧本子传奇gm命令是数据[zk: 127.0.0.1:2181(CONNECTED) 21] rmr "/data-test"# 或 deleteall == 新本子传奇gm命令是数据[zk: 127.0.0.1:2181(CONNECTED) 21] rmr "/data-test"# 悔过书删除后双色球开奖结果查询。/data-test和其子坡屋面伸缩缝节点都不留存了[zk: 192.168.16.32:2183(CONNECTED) 25] ls /data-testNode does not exist: /data-test # ====================================================================================================================================================# step 13: 设立开机启动zookeeper# 开立zookeepr-1.service广州钢制文件柜,正象# 农转非到root账户su root# 坡屋面伸缩缝节点1/2/3# 配置伪集群,复制三个马坡屋面伸缩缝节点 myid=1/2/3的service服务广州钢制文件柜V_NODE_NUM=3for ((i=1;i<=${V_NODE_NUM};i++))doecho "${i}, begin the service register : zookeeper-${i}, ...."cat > /etc/systemd/system/zookeeper-${i}.service <<EOF[Unit]Description=zookeeper-${i} serviceAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]User=zookeeperType=forkingTimeoutSec=0Environment="JAVA_HOME=/env/jdk/jdk-12.0.2"ExecStart=/app/zookeeper/zookeeper-${i}/bin/zkServer.sh start /app/zookeeper/zookeeper-${i}/conf/zoo.cfg# ExecStop=/app/zookeeper/zookeeper-${i}/bin/zkServer.sh stop /app/zookeeper/zookeeper-${i}/conf/zoo.cfgRestartSec=5LimitNOFILE=1000000[Install]WantedBy=multi-user.targetEOF# register servicesystemctl enable zookeeper-${i}systemctl daemon-reload# start servicesystemctl start zookeeper-${i} &# check servicesystemctl status zookeeper-${i} ps -ef | grep zookeeper-${i}netstat -nltp | grep zookeeper-${i}echo "${i}, finish the service register : zookeeper-${i}, ...."done# for 循环往复 - end# ====================================================================================================================================================# step 14: 安设zookeeper 可视化UI接触面工具 = zkui# 1. 首先。从手底下git地址大全下载机内码,然后通过maven和eclipse构建破译,得到jar包# 本子 = zkui-2.0-SNAPSHOTS# SOURCE = https://github.com/DeemOpen/zkui.git# git clone https://github.com/DeemOpen/zkui.git# 2. 开立zkui的linux孵卵器的安设索引mkdir -p /app/zkui/zkui-2.0# 复制zkui-2.0-SNAPSHOT.jar广州钢制文件柜到此索引uls -al /app/zkui/zkui-2.0/zkui-2.0-SNAPSHOT.jar# 3. 开立zkui的配置广州钢制文件柜,正象# 瞩目:zkui的安设。可以和zookeeper孵卵器不在统一台孵卵器上。cat > /app/zkui/zkui-2.0/config.cfg <<EOF#Server PortserverPort=19090#Comma seperated list of all the zookeeper serverszkServer=CNT7XZKPD02:2181,CNT7XZKPD02:2182,CNT7XZKPD02:2183#Http path of the repository. Ignore if you dont intent to upload files from repository.scmRepo=:2181/@rev1=#Path appended to the repo url. Ignore if you dont intent to upload files from repository.scmRepoPath=//appconfig.txt#if set to true then userSet is used for authentication, else ldap authentication is used.ldapAuth=falseldapDomain=mycompany,mydomain#ldap authentication url. Ignore if using file based authentication.ldapUrl=ldap://<ldap_host>:<ldap_port>/dc=mycom,dc=com#Specific roles for ldap authenticated users. Ignore if using file based authentication.ldapRoleSet={"users": [{ "username":"domain\\user1" , "role": "ADMIN" }]}userSet = {"users": [{ "username":"admin" , "password":"password","role": "ADMIN" },{ "username":"appconfig" , "password":"password#123","role": "USER" }]}#Set to prod in production and dev in local. Setting to dev will clear history each time.env=prodjdbcClass=org.h2.DriverjdbcUrl=jdbc:h2:zkuijdbcUser=rootjdbcPwd=password#If you want to use mysql db to store history then comment the h2 db section.#jdbcClass=com.mysql.jdbc.Driver#jdbcUrl=jdbc:mysql://localhost:3306/zkui#jdbcUser=root#jdbcPwd=passwordloginMessage=Please login using admin/manager or appconfig/appconfig.#session timeout 5 mins/300 secs.sessionTimeout=300#Default 5 seconds to keep short lived zk sessions. If you have large data then the read will take more than 30 seconds so increase this accordingly. #A bigger zkSessionTimeout means the connection will be held longer and resource consumption will be high.zkSessionTimeout=5#Block PWD exposure over rest call.blockPwdOverRest=false#ignore rest of the props below if https=false.https=falsekeystoreFile=/home/user/keystore.jkskeystorePwd=passwordkeystoreManagerPwd=password# The default ACL to use for all creation of nodes. If left blank, then all nodes will be universally accessible# Permissions are based on single character flags: c (Create), r (read), w (write), d (delete), a (admin), * (all)# For example defaultAcl={"acls": [{"scheme":"ip", "id":"192.168.1.192", "perms":"*"}, {"scheme":"ip", id":"192.168.1.0/24", "perms":"r"}]defaultAcl=# Set X-Forwarded-For to true if zkui is behind a proxyX-Forwarded-For=falseEOF# 4. 添加zookeeper账户对安设索引的权限ls -al /app/zkui/zkui-2.0/ && \chmod -R 775 /app/zkui/zkui-2.0/ && \chown -R zookeeper:ops_install /app/zkui/zkui-2.0/ && \ls -al /app/zkui/zkui-2.0/# 4. 启动zkui,正象java -Xms128m -Xmx512m -XX:MaxMetaspaceSize=256m -jar /app/zkui/zkui-2.0/zkui-2.0-SNAPSHOT-jar-with-dependencies.jar# 5. 设立开机自动启动,正象cat > /etc/systemd/system/zkui.service <<EOF[Unit]Description=zkui-2.0 serviceAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]User=zookeeperType=forkingTimeoutSec=0Environment="ZKUI_HOME=/app/zkui/zkui-2.0/"ExecStart=${JAVA_HOME}/bin/java -Xms128m -Xmx512m -XX:MaxMetaspaceSize=256m -jar /app/zkui/zkui-2.0/zkui-2.0-SNAPSHOT-jar-with-dependencies.jarRestartSec=5LimitNOFILE=1000000[Install]WantedBy=multi-user.targetEOF# 登记服务systemctl enable zkui# 启动服务systemctl start zkui &# 悔过书服务systemctl status zkuinetstat -nltp | grep 19090ps -ef | grep zkui# ====================================================================================================================================================

 

结尾。截图正象

1. zookeeper 运行双色球开奖结果查询,正象

images/loading.gif' data-original="https://img2020.cnblogs.com/blog/162289/202007/162289-20200701101058347-1130510145.png" width="800" loading="lazy">

 

 

 

 

2. zkui, 运行双色球开奖结果查询正象

 

 

 

原文章标题大全:zookeeper 伪集群安设和 zkui治理UI配置

基本词:

渡人请保存白文网址管家: http://www.www.d5897.com/a/462504.html
*破例宣言:之上内容来自于网络编采,著作权属性质原作者所有,如有侵权,请具结我们: admin#www.d5897.com (#包换@)。
您可能感感兴趣的文章
Baidu