99偷拍视频精品区一区二,口述久久久久久久久久久久,国产精品夫妇激情啪发布,成人永久免费网站在线观看,国产精品高清免费在线,青青草在线观看视频观看,久久久久久国产一区,天天婷婷久久18禁,日韩动漫av在线播放直播

LinuxCentos7Zookeeper安轉(集群)-創新互聯

Zookeeper安轉(集群)

以三個虛擬機為例創建集群
Zookeeper集群節點數量要是奇數

創新互聯成立與2013年,先為江蘇等服務建站,江蘇等地企業,進行企業商務咨詢服務。為江蘇企業網站制作PC+手機+微官網三網同步一站式服務解決您的所有建站問題。準備工作
  1. 修改主機名hostname
  2. 修改IP地址
  3. 修改hosts映射
  4. 關閉防火墻
  5. 免密登錄(非對稱單向登錄)
  6. jdk安轉
Zookeeper安裝(單個節點配置)

上傳Zookeeper.tar.gz 到Linux(推薦使用Xftp 4)

解壓到/export/server (自定義目錄方便查找)

  1. 對解壓后的文件進行改名 去除版本號(方便使用)

修改zookeeper文件中的zoo_sample.cfg為 zoo.cfg(方便使用)

環境變量配置
編輯 .bashrc 文件, 在文件末尾添加以下環境變量配置:
ZooKeeper Env
export ZOOKEEPER_HOME=/opt/zookeeper
export PATH=$PATH:$ZOOKEEPER_HOME/bin
配置zoo.cfg(重點)
  1. dataDir配置路徑進行修改

    1. 該配置項用于配置zookeeper快照日志和事務日志的存儲地址
    2. /export/data/zkdata (自定義路徑)
  2. 在文件末尾添加 server.id=host:port:port

    1. 示例
      server.1=master:2888:3888
      server.2=slave01:2888:3888
      server.3=slave02:2888:3888
    2. Server ID, 用來標識服務器在集群中的序號
      ZooKeeper 集群中, 每臺服務器上的 zoo.cfg 配置文件內容一致。

  3. 創建myid文件(識別服務器)

    1. echo 1 >/export/data/zkdata/myid
    2. 也可以使用vim 進行修改

如下

# 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=/export/data/zkdata
# 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.1=master:2888:3888
server.2=slave01:2888:3888
server.3=slave02:2888:3888
剩余節點配置

最后將修改好的zookeeper文件 使用 scp命令復制到剩下兩個節點中
在/export/server路徑下執行

  • scp -r zookeeper/ root@node2:$PWD
  • 或者 scp -r zookeeper/ root@node2:/export/server

修改myid

  • echo 2 >/export/data/zkdata/myid
  • echo 3 >/export/data/zkdata/myid

初次寫,如有錯誤,還請指正

你是否還在尋找穩定的海外服務器提供商?創新互聯www.cdcxhl.cn海外機房具備T級流量清洗系統配攻擊溯源,準確流量調度確保服務器高可用性,企業級服務器適合批量采購,新人活動首月15元起,快前往官網查看詳情吧

文章標題:LinuxCentos7Zookeeper安轉(集群)-創新互聯
文章轉載:http://www.yijiale78.com/article48/cdjhep.html

成都網站建設公司_創新互聯,為您提供搜索引擎優化App設計網站營銷動態網站電子商務自適應網站

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

外貿網站制作