Start and Stop ClickHouse Services (Using Command Line and Service Management Tools)
Command Line Method
Start the ClickHouse Service
/usr/bin/clickhouse-server --daemonize --log-level=info --port=9000 &
Stop the ClickHouse Service
pkill -f /usr/bin/clickhouse-server
Using Service Management Tools
Start the ClickHouse Service (using systemd)
sudo systemctl start clickhouse
Stop the ClickHouse Service (using systemd)
sudo systemctl stop clickhouse
Restart the ClickHouse Service (using systemd)
sudo systemctl restart clickhouse
Check the Status of the ClickHouse Service (using systemd)
sudo systemctl status clickhouse
Advanced Tips
- Use
pkillcommand to quickly stop the ClickHouse service. - Use
systemctlcommand to manage the state and operations of the ClickHouse service.