2022-02-08 18:12:04 +00:00
|
|
|
[Unit]
|
|
|
|
Description=ClickHouse Server (analytic DBMS for big data)
|
|
|
|
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]
|
2022-11-19 18:18:03 +00:00
|
|
|
Type=notify
|
|
|
|
|
|
|
|
# Switching off watchdog is very important for sd_notify to work correctly.
|
|
|
|
Environment=CLICKHOUSE_WATCHDOG_ENABLE=0
|
2022-02-08 18:12:04 +00:00
|
|
|
User=clickhouse
|
|
|
|
Group=clickhouse
|
|
|
|
Restart=always
|
|
|
|
RestartSec=30
|
|
|
|
RuntimeDirectory=clickhouse-server
|
|
|
|
ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid
|
|
|
|
# Minus means that this file is optional.
|
|
|
|
EnvironmentFile=-/etc/default/clickhouse
|
|
|
|
LimitCORE=infinity
|
|
|
|
LimitNOFILE=500000
|
2022-04-02 22:26:41 +00:00
|
|
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE
|
2022-02-08 18:12:04 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
# ClickHouse should not start from the rescue shell (rescue.target).
|
|
|
|
WantedBy=multi-user.target
|