安装和升级 > 安装和配置指南 > 使用 PTC 解决方案安装程序 > 安装 Windchill 解决方案 > 可选产品设置 > Windchill Index Search 安装 > Windchill Index Search 安装后配置 > 在云模式下安装索引搜索服务器 > 设置和启动 Zookeeper 节点
  
设置和启动 Zookeeper 节点
如果已在 Solaris 平台上安装 Index Search Sever,请执行以下步骤:
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 节点的错误。这是因为尚未启动那些节点。可以忽略这些错误。