mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Add systemd service-file for clickhouse-keeper
This commit is contained in:
parent
bb44a14a56
commit
26a292dafc
27
packages/clickhouse-keeper.service
Normal file
27
packages/clickhouse-keeper.service
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ClickHouse Keeper - zookeeper compatible distributed coordination server
|
||||||
|
Requires=network-online.target
|
||||||
|
# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure
|
||||||
|
# that the time was adjusted already, if you use systemd-timesyncd you are
|
||||||
|
# safe, but if you use ntp or some other daemon, you should configure it
|
||||||
|
# additionaly.
|
||||||
|
After=time-sync.target network-online.target
|
||||||
|
Wants=time-sync.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=clickhouse
|
||||||
|
Group=clickhouse
|
||||||
|
Restart=always
|
||||||
|
RestartSec=30
|
||||||
|
RuntimeDirectory=%p # %p is resolved to the systemd unit name
|
||||||
|
ExecStart=/usr/bin/clickhouse-keeper --config=/etc/clickhouse-keeper/keeper_config.xml --pid-file=%t/%p/%p.pid
|
||||||
|
# Minus means that this file is optional.
|
||||||
|
EnvironmentFile=-/etc/default/%p
|
||||||
|
LimitCORE=infinity
|
||||||
|
LimitNOFILE=500000
|
||||||
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
# ClickHouse should not start from the rescue shell (rescue.target).
|
||||||
|
WantedBy=multi-user.target
|
@ -30,6 +30,8 @@ contents:
|
|||||||
type: config|noreplace
|
type: config|noreplace
|
||||||
- src: root/usr/bin/clickhouse-keeper
|
- src: root/usr/bin/clickhouse-keeper
|
||||||
dst: /usr/bin/clickhouse-keeper
|
dst: /usr/bin/clickhouse-keeper
|
||||||
|
- src: clickhouse-keeper.service
|
||||||
|
dst: /lib/systemd/system/clickhouse-keeper.service
|
||||||
# docs
|
# docs
|
||||||
- src: ../AUTHORS
|
- src: ../AUTHORS
|
||||||
dst: /usr/share/doc/clickhouse-keeper/AUTHORS
|
dst: /usr/share/doc/clickhouse-keeper/AUTHORS
|
||||||
|
Loading…
Reference in New Issue
Block a user