Skip to main content
Skip to main content

Install ClickHouse on Debian/Ubuntu

It is recommended to use official pre-compiled deb packages for Debian or Ubuntu.

Setup the Debian repository

To install ClickHouse run the following commands:


Old distributions method for installing the deb-packages

Install ClickHouse server and client

Start ClickHouse

To start the ClickHouse server, run:

To start ClickHouse client, run:

If you set up a password for your server, then you will need to run:

Install standalone ClickHouse Keeper

tip

In production environments we strongly recommend running ClickHouse Keeper on dedicated nodes. In test environments, if you decide to run ClickHouse Server and ClickHouse Keeper on the same server, then you do not need to install ClickHouse Keeper as it is included with ClickHouse server.

To install clickhouse-keeper on standalone ClickHouse Keeper servers, run:

Enable and start ClickHouse Keeper

Packages

The various deb packages available are detailed below:

PackageDescription
clickhouse-common-staticInstalls ClickHouse compiled binary files.
clickhouse-serverCreates a symbolic link for clickhouse-server and installs the default server configuration.
clickhouse-clientCreates a symbolic link for clickhouse-client and other client-related tools. and installs client configuration files.
clickhouse-common-static-dbgInstalls ClickHouse compiled binary files with debug info.
clickhouse-keeperUsed to install ClickHouse Keeper on dedicated ClickHouse Keeper nodes. If you are running ClickHouse Keeper on the same server as ClickHouse server, then you do not need to install this package. Installs ClickHouse Keeper and the default ClickHouse Keeper configuration files.

info

If you need to install a specific version of ClickHouse, you have to install all packages with the same version: sudo apt-get install clickhouse-server=21.8.5.7 clickhouse-client=21.8.5.7 clickhouse-common-static=21.8.5.7