Skip to main content
Skip to main content

Install ClickHouse on rpm-based distributions

It is recommended to use official pre-compiled rpm packages for CentOS, RedHat, and all other rpm-based Linux distributions.

Setup the RPM repository

Add the official repository by running the following command:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo

For systems with zypper package manager (openSUSE, SLES), run:

sudo zypper addrepo -r https://packages.clickhouse.com/rpm/clickhouse.repo -g
sudo zypper --gpg-auto-import-keys refresh clickhouse-stable

In the steps below, yum install can be replaced by zypper install, depending on which package manager you are using.

Install ClickHouse server and client

To install ClickHouse run the following commands:

sudo yum install -y clickhouse-server clickhouse-client
  • You can replace stable with lts to use different release kinds based on your needs.
  • You can download and install packages manually from packages.clickhouse.com/rpm.
  • To specify a particular version, add -$version to the end of the package name, for example:
sudo yum install clickhouse-server-22.8.7.34

Start ClickHouse server

To start ClickHouse server, run:

sudo systemctl enable clickhouse-server
sudo systemctl start clickhouse-server
sudo systemctl status clickhouse-server

To start ClickHouse client, run:

clickhouse-client

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

clickhouse-client --password

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:

sudo yum install -y clickhouse-keeper

Enable and start ClickHouse Keeper

sudo systemctl enable clickhouse-keeper
sudo systemctl start clickhouse-keeper
sudo systemctl status clickhouse-keeper