安裝與升級 > 安裝與組態指南 > 使用 PTC Solution Installer > 安裝 Windchill 解決方案 > 選用產品設定 > Windchill Index Search 安裝 > Windchill Index Search 安裝後組態 > 在雲端模式下配置索引搜尋伺服器 > 設定和啟動 Zookeeper 節點
  
設定和啟動 Zookeeper 節點
如果已在 Solaris 平台上安裝 Index Search 伺服器,請執行下列步驟:
1. 建立每個 Zookeeper 節點的資料目錄。例如:
/opt/ptc/commondata/zkdata/node1
/opt/ptc/commondata/zkdata/node2
/opt/ptc/commondata/zkdata/node3
2. 建立名為 "myid" 的檔案來識別 Zookeeper 節點。檔案的目錄應該識別節點。
例如,下列 myid 檔案的目錄可以僅通過編號 1 表示:
/opt/ptc/commondata/zkdata/node1/myid
同樣地,輸入 2 可以導覽到 node2/myid,輸入 3 可以導覽到 node3/myid
* 
這些是指派給 Zookeeper 的 ID,將用於下一步中的 zoo.cfg
3. 建立 Zookeeper 組態檔案︰
<INDEX_SEARCH_HOME>\zookeeper\conf\zoo.cfg
其中 <INDEX_SEARCH_HOME> 是安裝索引搜尋伺服器的安裝目錄。
針對 node1 新增下列內容:
# The number of milliseconds of each tick
tickTime=2000
# 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=D:\\ptc\\commondata\\zkdata\\node1 OR /opt/ptc/commondata/zkdata/node1
# the port at which the clients will connect
clientPort=<埠號>
server.1=<主機1>.ptcnet.ptc.com:2888:3888
server.2=<主機2>.ptcnet.ptc.com:2889:3889
server.3=<主機3>.ptcnet.ptc.com:2890:3890
# 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
下列內容應該具唯一性,而且針對每個 Zookeeper 管理員節點指定︰
dataDir
Zookeeper 節點的資料目錄。
clientPort
Zookeeper 接聽請求的埠。
4. 執行下列指令,啟動所有 Zookeeper 節點︰
sh <INDEX_SEARCH_HOME>\zookeeper\bin\zkServer.sh start
* 
啟動 Zookeeper 節點時,會開始與總體組態 (zoo.cfg) 中指定的其他 Zookeeper 節點進行通訊。
啟動時,您可能會看見主控台或記錄檔中的錯誤,報告節點無法連接至其他 Zookeeper 節點。這是因為這些節點尚未啟動。可以忽略這些錯誤。