clickhouse-server.service
cat /etc/systemd/system/clickhouse-server.service
[Unit]
Description=ClickHouse Server (analytic DBMS for big data)
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
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
LimitCORE=infinity
LimitNOFILE=500000
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE
[Install]
WantedBy=multi-user.target
linux-90ii:/etc/clickhouse-server # systemctl status clickhouse-server
● clickhouse-server.service - ClickHouse Server (analytic DBMS for big data)
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
Active: active (running) since 四 2022-02-17 18:48:14 CST; 43s ago
Main PID: 27954 (clickhouse-serv)
Tasks: 35 (limit: 512)
CGroup: /system.slice/clickhouse-server.service
└─27954 /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid
systemctl start clickhouse-server
systemctl status clickhouse-server
ps -ef| grep clickhouse-server
clickhouse-client --port 19000 -m -h 127.0.0.1 -u default --password eb22d98eaf028b1ca5c36548193d604a
clickhouse-client -u default --password xxxxxx --port 9000 -hcentos-1 --query="show databases"
clickhouse-client --port 9002 --host 127.0.0.1 --multiline
default
cat /etc/clickhouse-server/config.xml
cat /etc/clickhouse-server/users.xml
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<!-- Path to data directory, with trailing slash. -->
<path>/var/lib/clickhouse/</path>
<!-- Path to temporary data for processing hard queries. -->
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>