Altinity Stable Builds Deb Install Guide

How to install the Altinity Stable Builds for ClickHouse on Debian based systems.

Installation Instructions: Deb packages

ClickHouse can be installed from the Altinity Stable builds, located at https://builds.altinity.cloud, or from the ClickHouse community repository.

Deb Prerequisites

The following prerequisites must be installed before installing an Altinity Stable build of ClickHouse:

  • curl
  • gnupg2
  • apt-transport-https
  • ca-certificates

These can be installed prior to installing ClickHouse with the following command:

sudo apt-get update
sudo apt-get install curl gnupg2 apt-transport-https ca-certificates

Deb Packages for Altinity Stable Build

To install ClickHouse Altinity Stable build via Deb based packages from the Altinity Stable build repository:

  1. Update the apt-get local repository:

    sudo apt-get update
    
  2. Install the Altinity package signing keys:

    sudo sh -c 'mkdir -p /usr/share/keyrings && curl -s https://builds.altinity.cloud/apt-repo/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/altinity-dev-archive-keyring.gpg'
    
  3. Update the apt-get repository to include the Altinity Stable build repository with the following commands:

    sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/altinity-dev-archive-keyring.gpg] https://builds.altinity.cloud/apt-repo stable main" > /etc/apt/sources.list.d/altinity-dev.list'
    
    sudo apt-get update
    
  4. Install either a specific version of ClickHouse, or the most current version.

    1. To install a specific version, include the version in the apt-get install command. The example below specifies the version 21.8.10.1.altinitystable:
    version=21.8.10.1.altinitystable
    
    sudo apt-get install clickhouse-common-static=$version clickhouse-client=$version clickhouse-server=$version
    
    1. To install the most current version of the ClickHouse Altinity Stable build without specifying a specific version, leave out the version= command.
    sudo apt-get install clickhouse-client clickhouse-server
    
  5. When prompted, provide the password for the default clickhouse user.

  6. Restart server.

    Installed packages are not applied to an already running server. It makes it convenient to install the packages first and restart later when convenient.

    sudo systemctl restart clickhouse-server
    

Remove Community Package Repository

For users upgrading to Altinity Stable builds from the community ClickHouse builds, we recommend removing the community builds from the local repository. See the instructions for your distribution of Linux for instructions on modifying your local package repository.

Community Deb Builds

  1. Configure the apt-get package repository with the following commands:

    sudo apt-get install dirmngr
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
    
    echo "deb http://repo.clickhouse.tech/deb/stable/ main/" | sudo tee \
        /etc/apt/sources.list.d/clickhouse.list
    sudo apt-get update
    
  2. Install packages.

    We recommend you install the specific ClickHouse versions by specifying it in the install commands. The version numbers are listed in the Release Notes.

    version=20.8.12.2
    sudo apt-get install -y clickhouse-server=$version \
    clickhouse-client=$version \
    clickhouse-common-static=$version
    
  3. Restart server. Installed packages are not applied to the already running server. It makes it convenient to install packages first and restart later when convenient.

    sudo systemctl restart clickhouse-server
    
Last modified 2021.11.17: Updated Kubernetes, Altinity Stable