In this tutorial, we will explain the steps of installing ClickHouse on a Debian 9 VPS.
ClickHouse is a free and open-source DBMS (columnar database management system) developed by Yandex. With ClickHouse, users can manage very large volumes of data, including non-aggregated data, and generate data reports in real time – and it can do all of this pretty quickly, too. It is able to process hundreds of millions of data entries per second on a server. The system is linearly scalable and can be scaled up to store and process trillions of rows and petabytes of data. The installation process is pretty easy and straightforward, and it can be done in less than 10 minutes. Let’s get started.
ClickHouse comes with a lot of useful features. Some of them are listed below:
- True Column-Oriented DBMS
- Data Compression
- Disk Storage of Data
- Parallel Processing on Multiple Cores
- Distributed Processing on Multiple Servers
- SQL Support
- Vector Engine
- Real-time Data Updates
- Suitable for Online Queries
- Support for Approximated Calculations
- Data replication and data integrity support
and much more …
Table of Contents
Prerequisites
- a server or VPS running Debian 9 with SSH access and at least 4 GB of RAM. For the purposes of this tutorial, we will use one of our SSD Debian VPS hosting plans (SSD 4 to be exact).
- System user with root privileges, or access to the root user. All of our VPS hosting plans come with full root access.
Step 1: Log in and Update the Server
In order to start with the ClickHouse installation, we have to log in to the Debian 9 VPS via SSH as the root user.
Make sure to replace “IP_address” and “Port_number” with their respective values for your server.
After you log in, run the following command to make sure that all installed packages on your Debian 9 VPS are updated to their latest available versions:
Step 2: Install ClickHouse
ClickHouse can be installed in several different ways. You can compile the code for your server from the source code, but in this tutorial we will guide you through the steps of installing it from Yandex’s official pre-compiled .deb package. This is the recommended way of installing this application. The first step of the ClickHouse installation is to add Yandex’s official repository to your server. To do that, create a ‘clickhouse.list’ file at the path /etc/apt/sources.list.d/
with the following content:
After you save and exit the file, add the repository key so that you can download the ClickHouse package securely:
Once that’s done, update the repositories list:
Finally, run the following command to install ClickHouse server and client on your Debian 9 VPS:
We’re installing both the client and the server, as the client allows you to access and manage the server through the command line.
Once the installation is completed, start the ClickHouse server and enable it to automatically start upon a server reboot:
You can check if the ClickHouse server is up and running by checking its status through systemctl:
The output should show that it’s running, much like the output shows here:
We have successfully installed the stable release of ClickHouse on the server. To check the version that was installed onto your server, issue the following command:
At the moment of writing this tutorial, it is version 19.8.3.8. If you want to install and use a newer release of ClickHouse, replace stable
with testing
in the /etc/apt/sources.list.d/clickhouse.list
file. It should look like the following:
That’s all! ClickHouse is now successfully installed on your Debian 9 VPS and is ready to use. ClickHouse listens on localhost on port 9000 by default. You can log into the ClickHouse server using the ClickHouse client through the command line interface, as shown below:
If you need more details on ClickHouse or you need to learn how to get started, please visit their official documentation.
Of course, you don’t have to install ClickHouse on Debian 9 if you use one of our Managed Debian Hosting services, in which case you can simply ask our expert system administrators to install ClickHouse for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install ClickHouse on Debian 9, please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks.