How to install zookeeper as service on CentOS 7
Asked Answered
V

2

13

I am trying to install zookeeper on CentOS 7 using yum install zookeeper or yum install zookeeperd but it throws: There is no zookeeper package available.

Vidicon answered 12/1, 2017 at 10:52 Comment(1)
You can download e.g. wget apache.spd.co.il/zookeeper/current/… etc blog.redbranch.net/2018/04/19/zookeeper-install-on-centos-7Ayeshaayin
M
14

You have to add the repo that contains zookeeper. You can do this with:

yum install https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm

Afterwards you can install zookeeper normally.

See the documents here:

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

Montero answered 12/1, 2017 at 12:42 Comment(1)
Cannot open: archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/…. Skipping.Ayeshaayin
R
28

An alternative answer if you don't want to install a 3rd party repo from cloudera you could use the Apache Bigtop repo. Apache being the actual maintainer of Zookeeper.

As of writing it's this repo file on CentOS 7.

This will let you install Zookeeper by simply running yum install zookeeper.

Unfortunately that package does not include a systemd service file so I had to write my own, but that's not very hard.

[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
Revivalism answered 7/8, 2017 at 21:32 Comment(1)
You can name the file zookeeper.service, place it in /etc/systemd/system/, and set permissions as chmod 664 /etc/systemd/system/zookeeper.service (see: access.redhat.com/documentation/en-us/red_hat_enterprise_linux/…)Tachymetry
M
14

You have to add the repo that contains zookeeper. You can do this with:

yum install https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm

Afterwards you can install zookeeper normally.

See the documents here:

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

Montero answered 12/1, 2017 at 12:42 Comment(1)
Cannot open: archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/…. Skipping.Ayeshaayin

© 2022 - 2024 — McMap. All rights reserved.