Installing and Removing the ClickHouse DBMS
To install or remove ClickHouse on a Linux server via Docker, you must prepare the environment in accordance with system requirements.
For recommendations on system requirements, refer to the Technical Requirements for Server and Hardware Equipment page.
Preparing SSL Certificate and Private Key for ClickHouse DBMS Server
Before installing and launching ClickHouse, you must ensure secure connection between client applications and the DBMS.
For instructions on preparing an SSL certificate and privat key to enable secure HTTPS connections with the ClickHouse server, see: Preparing a Certificate and Private Key for the ClickHouse DBMS Server.
Running Docker Service with ClickHouse DBMS
Once the SSL certificates are ready, proceed with installing the ClickHouse DBMS in a Docker container.
The step-by-step process for launching the ClickHouse Docker service is provided here: Starting the ClickHouse DBMS Docker Service.
Environment Variables
When launching the container, you can pass environment variables that modify configuration files of the application. The available parameters are presented in the table below.
| Parameter | Value | Description |
|---|---|---|
APP_USER_ACCESS_MANAGEMENT | 0 or 1Default: 0 | Disallows/allows ClickHouse administrator to create additional users and manage access rights via SQL queries |
LIMIT_MEMORY | Default: 0.9 (90%) | The coefficient of maximum memory consumption by the server for processing all SQL queries |
PROMETHEUS | true or falseDefault: false | Enables the transmission of metrics for Prometheus. To ensure proper operation, it is necessary to open port 9363 in the container. To do this, add the following to the service launch command: --publish published=9363,target=9363 |
SIZE_LOG_FILE | Log size in megabytes. Default is 1000 (1 GB) | Size of technical logs clickhouse-server.log and clickhouse-server.err.log |
COUNT_LOG_FILE | Default is 10 | Number of retained technical log files |
You can find more detailed information about Prometheus in the ClickHouse documentation.
Connecting the Operavix Server to the ClickHouse Analytical DBMS
After installing ClickHouse DBMS and the Operavix application, you must configure a connection between them so that Operavix can use the DBMS for creating reports, executing SQL queries, and analytics.
This section explains how to correctly specify connection parameters to ensure stable and secure data exchange between system components: Connecting the Operavix Server to the ClickHouse Analytical DBMS.
Removing ClickHouse DBMS
When ClickHouse is no longer needed or requires reinstallation, you must properly remove all components: the service, secrets, volumes, and Docker cluster configuration.
To remove ClickHouse DBMS, execute the following commands on the server where it is installed:
# docker service rm operavix-clickhouse
# docker secret rm operavix_app_user operavix_app_user_password_hash operavix_clickhouse.crt operavix_clickhouse.key operavix_clickhouse_dhparam.pem operavix_external_user operavix_external_user_password_hash
# docker volume rm operavix-clickhouse operavix-clickhouse-log
# docker swarm leave –force
You can find the commands to remove Docker for a specific Linux distribution in the official documentation.
Was the article helpful?