搭建zookeper管理solr集群

2021-09-29 17:54:53 字數 3835 閱讀 2679

以兩台伺服器為例:

wget  

在10.0.1.201伺服器上:

1、進入/home/目錄下(隨便選擇目錄),將zookeeper-3.4.9.tar.gz壓縮檔案放入該目錄下

執行命令

tar -zxvf zookeeper-3.4.9.tar.gz

解壓zookeeper安裝包zookeeper-3.4.9資料夾

2、接下來建立data目錄,並在data目錄中建立myid檔案,將"1"寫入到myid檔案中

cd  /home/zookeeper-3.4.9

mkdir data

echo 1 >> data/myid

zookeeper-3.4.9目錄下建立乙個存放日誌的目錄logs

mkdir logs

3、進入conf目錄下,將zoo_sample.cfg檔案重新命名為zoo.cfg

cd conf

mv zoo_sample.cfg zoo.cfg

4、最後修改zoo.cfg中的引數

# the number of milliseconds of each tick

ticktime=2000

# the number of ticks that the initial 

# synchronization phase can take

initlimit=5

# the number of ticks that can pass between 

# sending a request and getting an acknowledgement

synclimit=2

# the directory where the snapshot is stored.

# do not use /tmp for storage, /tmp here is just 

# example sakes.

datadir=/home/zookeeper-3.4.9/data

datalogdir=/home/zookeeper-3.4.9/logs

# 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.

## ## 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=10.0.1.201:2881:3881

server.2=10.0.1.202:2881:3881

5、啟動zookeper

/home/zookeeper-3.4.9/bin/zkserver.sh start

6、最後進入solr安裝目錄的bin目錄下修改solr.in.s**件,在檔案中新增

solr_mode=solrcloud

zk_host=10.0.1.201:2181,10.0.1.202:2181

solr_host="10.0.1.201"

在10.0.1.202伺服器上:

1、進入/home/目錄下(隨便選擇目錄),將zookeeper-3.4.9.tar.gz壓縮檔案放入該目錄下

執行命令

tar -zxvf zookeeper-3.4.9.tar.gz

解壓zookeeper安裝包zookeeper-3.4.9資料夾

2、接下來建立data目錄,並在data目錄中建立myid檔案,將"1"寫入到myid檔案中

cd  /home/zookeeper-3.4.9

mkdir data

echo 2 >> data/myid

zookeeper-3.4.9目錄下建立乙個存放日誌的目錄logs

mkdir logs

3、進入conf目錄下,將zoo_sample.cfg檔案重新命名為zoo.cfg

cd conf

mv zoo_sample.cfg zoo.cfg

4、最後修改zoo.cfg中的引數

# the number of milliseconds of each tick

ticktime=2000

# the number of ticks that the initial 

# synchronization phase can take

initlimit=5

# the number of ticks that can pass between 

# sending a request and getting an acknowledgement

synclimit=2

# the directory where the snapshot is stored.

# do not use /tmp for storage, /tmp here is just 

# example sakes.

datadir=/home/zookeeper-3.4.9/data

datalogdir=/home/zookeeper-3.4.9/logs

# 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.

## ## 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=10.0.1.201:2881:3881

server.2=10.0.1.202:2881:3881

5、啟動zookeper

/home/zookeeper-3.4.9/bin/zkserver.sh start

可使用在兩台伺服器上檢視zookeeper的執行狀態

/home/zookeeper-3.4.9/bin/zkserver.sh status 

6、最後進入solr安裝目錄的bin目錄下修改solr.in.s**件,在檔案中新增

solr_mode=solrcloud

zk_host=10.0.1.201:2181,10.0.1.202:2181

solr_host="10.0.1.202"

CentOS搭建dubbo admin管理平台

1.環境 centos6.5 jdk1.7 開始用的jdk1.8,安裝dubboadmin時總是報錯,所以改為1.7 zookeeper3.4.9 2.安裝,解壓檔案到root資料夾下 也可以將解壓後的資料夾修改為root mv dubbo admin 2.5.4 snapshot root unz...

react antd SPA 管理後台搭建

學習了前端主流的框架react基於 react antd 等搭建了一套後台專案的模板github 安裝 yarn npm install g yarn 進入專案目錄啟動專案訪問本地localhost 3000埠 yarn start 安裝依賴 yarn add antd react router d...

Quasar搭建後台管理

quasar官網 使用quasar搭建的後台管理系統github 安裝 npm install or yarn install 執行 quasar dev 打包 quasar build 使用quasar搭建的後台管理系統 角色選單許可權 登入成功後,根據使用者資訊,獲取選單 按鈕許可權控制 返回許...