我试图在CentOS 7上使用yum install zookeeper
或 安装zookeeper,yum install zookeeperd
但它会抛出:There is no zookeeper package available.
如果您不想从cloudera安装第三方存储库,则可以使用Apache Bigtop存储库作为替代答案.Apache是Zookeeper的实际维护者.
截至撰写时,它是CentOS 7上的这个repo文件.
这将允许您通过简单地运行来安装Zookeeper yum install zookeeper
.
不幸的是,该软件包不包含systemd服务文件,因此我必须编写自己的文件,但这并不是很难.
[Unit] Description=Zookeeper After=syslog.target [Service] SyslogIdentifier=zookeeper TimeoutStartSec=10min Type=forking ExecStart=/usr/lib/zookeeper/bin/zkServer.sh start ExecStop=/usr/lib/zookeeper/bin/zkServer.sh stop [Install] WantedBy=multi-user.target
您必须添加包含zookeeper的repo.你可以这样做:
yum install https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm
之后你可以正常安装zookeeper.
请参阅此处的文件:
http://www.cloudera.com/documentation/enterprise/5-8-x/topics/cdh_ig_zookeeper_package_install.html http://www.cloudera.com/documentation/enterprise/5-8-x/topics/cdh_ig_cdh5_install.html