Install ClickHouse using tgz archives
It is recommended to use official pre-compiled
tgzarchives for all Linux distributions, where installation ofdeborrpmpackages isn't possible.
Review recommendations
Before installing ClickHouse, review the following recommendations:
- Swap: Disable the operating system's swap file in production environments.
- Disk space: The ClickHouse binary requires at least 2.5 GB of disk space for installation.
- Network: For distributed deployments (clustering), use at least 10 Gbit network connectivity. Network bandwidth is critical for processing distributed queries with large amounts of intermediate data, as well as for replication.
Estimating storage requirements
To estimate the disk space needed for your data:
- Estimate data volume: Take a sample of your data and calculate the average row size, then multiply by the number of rows you plan to store.
- Apply the compression coefficient: Load a sample into ClickHouse and compare the original data size with the stored table size. Clickstream data, for example, is typically compressed 6-10x.
- Account for replicas: If you plan to store data in multiple replicas, multiply the estimated volume by the number of replicas.
For more detailed hardware requirements, see "Sizing and hardware recommendations"
Download and install the latest stable version
The required version can be downloaded with curl or wget from repository https://packages.clickhouse.com/tgz/.
After that downloaded archives should be unpacked and installed with installation scripts.
Below is an example of how to install the latest stable version.
For production environments, it's recommended to use the latest stable-version.
You can find the release number on this GitHub page
with postfix -stable.
Get the latest ClickHouse version
Get the latest ClickHouse version from GitHub and store it in LATEST_VERSION variable.
Detect your system architecture
Detect the system architecture and set the ARCH variable accordingly:
Download tarballs for each ClickHouse component
Download tarballs for each ClickHouse component. The loop tries architecture-specific packages first, then falls back to generic ones.
Extract and install packages
Run the commands below to extract and install the following packages:
clickhouse-common-static
clickhouse-common-static-dbg
clickhouse-server
clickhouse-client