说明
可以用 clickhouse 自带命令,也可以使用 systemctrl 命令
查看状态
clickhouse status
没有启动,显示如下:
Now there is no clickhouse-server process.
已经启动,显示如下:
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 91470.
The process with pid = 91470 is running.
启动命令
clickhouse start
启动成功,显示如下:
chown --recursive clickhouse '/var/run/clickhouse-server/'
Will run su -s /bin/sh 'clickhouse' -c '/usr/bin/clickhouse-server --config-file /etc/clickhouse-server/config.xml --pid-file /var/run/clickhouse-server/clickhouse-server.pid --daemon'
Waiting for server to start
Waiting for server to start
停止命令
clickhouse stop
停止成功,显示如下:
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 91470.
The process with pid = 91470 is running.
Sent terminate signal to process with pid 91470.
Waiting for server to stop
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 91470.
The process with pid = 91470 is running.
Waiting for server to stop
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 91470.
The process with pid = 91470 is running.
Waiting for server to stop
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 91470.
The process with pid = 91470 is running.
Waiting for server to stop
Now there is no clickhouse-server process.
Server stopped
重启命令
clickhouse restart