Skip to main content
Version: 5.1

Deploying ClickHouse

Hardware and Software Requirements​

Hardware specifications are described in the ClickHouse hardware requirements section. The list of software requirements can be found in the corresponding Software requirements section.

Installation from TGZ Archive​

The required version can be downloaded using curl or wget from the repository:

https://packages.clickhouse.com/tgz/

After this, the downloaded archives should be extracted and installed using the installation scripts.

Steps to Download and Install the Latest Stable Version of ClickHouse​

It is recommended to use the latest stable version of ClickHouse. For proper installation, set the variables defining the ClickHouse architecture and version:

export ARCH=<architecture>
export VERSION=<stable_version>
  • <stable_version> - the stable version of ClickHouse
  • <architecture> - the architecture of the target system, possible values are amd64 or arm64
warning

The VERSION variable may not be set; in this case, the script will automatically use the latest available version.

Execute the script to download the ClickHouse distribution. The archive will be saved in the current directory.

if [ -z "$VERSION" ]; then
export VERSION=$(curl -s https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/utils/list-versions/version_date.tsv | \
grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -V -r | head -n 1)
fi

for PKG in clickhouse-common-static clickhouse-common-static-dbg clickhouse-server clickhouse-client
do
curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$VERSION-${ARCH}.tgz" \
|| curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$VERSION.tgz"
done

Installation on the Target Host​

For proper installation on the target host, set the same variables that were used in the previous step:

export ARCH=<architecture>
export VERSION=<stable_version>

The commands below install the main ClickHouse components from the tgz archives downloaded earlier.

tar -xzvf "clickhouse-common-static-$VERSION-${ARCH}.tgz" \
|| tar -xzvf "clickhouse-common-static-$VERSION.tgz"
sudo "clickhouse-common-static-$VERSION/install/doinst.sh"

tar -xzvf "clickhouse-common-static-dbg-$VERSION-${ARCH}.tgz" \
|| tar -xzvf "clickhouse-common-static-dbg-$VERSION.tgz"
sudo "clickhouse-common-static-dbg-$VERSION/install/doinst.sh"

tar -xzvf "clickhouse-server-$VERSION-${ARCH}.tgz" \
|| tar -xzvf "clickhouse-server-$VERSION.tgz"
sudo "clickhouse-server-$VERSION/install/doinst.sh" configure
sudo systemctl start clickhouse-server

tar -xzvf "clickhouse-client-$VERSION-${ARCH}.tgz" \
|| tar -xzvf "clickhouse-client-$VERSION.tgz"
sudo "clickhouse-client-$VERSION/install/doinst.sh"

During installation, you will be prompted to enter a password for the default user - default, which is saved in /etc/clickhouse-server/users.d/default-password.xml and can be changed later.

It is also necessary to allow network connections. This parameter affects the ability of clients to connect to the ClickHouse server from external networks.