1
Install ClickHouse using curl
Run the following command to download a single binary for your operating system.On Linux and macOS (x86_64 and ARM64), this also installs
clickhousectl,
the ClickHouse CLI, into ~/.local/bin (with a chctl alias). If the script
says ~/.local/bin is not on your PATH, add it:clickhousectl helps you install and manage multiple local ClickHouse versions,
run ClickHouse and Postgres servers in the background, and manage ClickHouse Cloud.To have clickhousectl install and manage ClickHouse versions for you instead,
run clickhousectl local use latest. See the clickhousectl install page
for the CLI-based workflow.To install just the clickhouse binary without clickhousectl, set
CLICKHOUSE_ONLY=1:For Mac users: If you’re getting errors that the developer of the binary can’t be verified, please see here.
2
Start clickhouse-local
clickhouse-local allows you to process local and remote files using ClickHouse’s
powerful SQL syntax and without the need for configuration. Table data is stored
in a temporary location, meaning that after a restart of clickhouse-local
previously created tables are no longer available.Run the following command to start clickhouse-local:3
Start clickhouse-server
Should you wish to persist data, you’ll want to run
clickhouse-server. You can
start the ClickHouse server using the following command:4
Start clickhouse-client
With the server up and running, open a new terminal window and run the following command
to launch You will see something like this:Table data is stored in the current directory and will still be available after a restart
of the ClickHouse server. If necessary, you can pass
clickhouse-client:-C config.xml as an additional command line argument to ./clickhouse server
and provide further configuration in a configuration
file. All available configuration settings are documented here and in the
example configuration file
template.You’re now ready to start sending SQL commands to ClickHouse!