Altinity Stable Builds macOS Install Guide

How to install the Altinity Stable Builds for ClickHouse with macOS.

Installing on macOS

Altinity Stable for ClickHouse is available to macOS users through the Homebrew package manager. Users and developers who use macOS as their preferred environment can quickly install a production ready version of ClickHouse within minutes.

The following instructions are targeted for users of Altinity Stable for ClickHouse. For more information on running community or other versions of ClickHouse on macOS, see either the Homebrew Tap for ClickHouse project or the blog post Altinity Introduces macOS Homebrew Tap for ClickHouse.

macOS Prerequisites

Brew Install for Altinity Stable Instructions

By default, installing ClickHouse through brew will install the latest version of the community version of ClickHouse. Extra steps are required to install the Altinity Stable version of ClickHouse. Altinity Stable is installed as a keg-only version, which requires manually setting paths and other commands to run the Altinity Stable for ClickHouse through brew.

To install Altinity Stable for ClickHouse in macOS through Brew:

  1. Add the ClickHouse formula via brew tap:

    brew tap altinity/clickhouse
  2. Install Altinity Stable for ClickHouse by specifying clickhouse@altinity-stable for the most recent Altinity Stable version, or specify the version with clickhouse@{Altinity Stable Version}. For example, as of this writing the most current version of Altinity Stable is 21.8, therefore the command to install that version of altinity stable is clickhouse@21.8-altinity-stable. To install the most recent version, use the brew install command as follows:

    brew install clickhouse@altinity-stable
  3. Because Altinity Stable for ClickHouse is available as a keg only release, the path must be set manually. These instructions will be displayed as part of the installation procedure. Based on your version, executable directory will be different based on the pattern:

    $(brew --prefix)/{clickhouse version}/bin

    For our example, clickhouse@altinity-stable gives us the following path setting:

    export PATH="/opt/homebrew/opt/clickhouse@21.8-altinity-stable/bin:$PATH"

    Using the which command after updating the path reveals the location of the clickhouse-server executable:

    which clickhouse-server
  4. To start the Altinity Stable for ClickHouse server use the brew services start command. For example:

    brew services start clickhouse@altinity-stable
  5. Connect to the new server with clickhouse-client:

    > clickhouse-client
    ClickHouse client version
    Connecting to localhost:9000 as user default.
    Connected to ClickHouse server version 21.11.6 revision 54450.
    ClickHouse client version is older than ClickHouse server. It may lack support for new features.
    penny.home :) select version()
    SELECT version()
    Query id: 128a2cae-d0e2-4170-a771-83fb79429260
    │ │
    1 rows in set. Elapsed: 0.004 sec.
    penny.home :) exit
  6. To end the ClickHouse server, use brew services stop command:

    brew services stop clickhouse@altinity-stable