background

As a “geek kid”, I couldn’t resist the urge to make a black Apple on Windows, get Linux on android, and now I want to deploy a stand-alone ClickHouse

Based on the environment

The server software version
bigdata1 Centos 7.6.1
bigdata1 ClickHouse 20.4.5.36

Hand to hand teach you white whoring three servers

ClickHouse can run on any Linux, FreeBSD, or Mac OS X CPU architecture with X86_64, AArch64, or PowerPC64LE.

  • Check whether the current CPU supports SSE 4.2
Sse4_2 ` > grep - q/proc/cpuinfo && echo "SSE 4.2 supported" | | echo ` SSE 4.2 not supportedCopy the code

Download and install

  • offline
Wget ` # download the RPM installation package ` ` > https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-client-20.4.5.36-2.noarch.rpm ` ` > Wget https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-common-static-20.4.5.36-2.x86_64.rpm ` ` > wget https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-common-static-dbg-20.4.5.36-2.x86_64.rpm ` ` > wget https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-server-20.4.5.36-2.noarch.rpm ` ` # installation ` ` > RPM - the ivh *. RPM `Copy the code

Installation progress

  • yum
` # add Clickhouse yum mirror ` ` > yum install yum - utils ` ` > RPM - import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG ` ` > Yum - config - manager - add - repo https://repo.clickhouse.tech/rpm/stable/x86_64 ` ` # installation ` ` > yum install Clickhouse - server - 20.4.5.36-2 clickhouse ` - the client - 20.4.5.36-2Copy the code

Modifying a Configuration File

  • Default configuration path

    logger : /var/log/clickhouse-server/clickhouse-server.log

    data : /var/lib/clickhouse/

    Based on server disk conditions, you can configure storage_Configuration to implement multi-volume storage and separate hot and cold data

Default configuration path > Logger: /var/log/clickhouse-server/clickhouse-server.log > data: /var/lib/clickhouse-/Copy the code
  • network
(Optional) vim /etc/clickhouse/config.xml ' '>... ` `> <listen_host>::</listen_host>` `> ... ` ` > < up > ` ` > < host > 127.0.0.1 < / host > ` ` > < port > 29000 < / port > ` ` > # username ` ` > < user > default < / user > ` ` > <password>123456</password>` `> </replica>` `> ... ` ` > `Copy the code
  • permissions
` # user permissions (optional) ` ` > vim/etc/clickhouse - server/users. XML ` ` >... ` `> <users>` `> ... ' '> # username' '> <default>' >... ` `> <password_sha256_hex>178bf286a6b838858cdd6ca0a1e96cae35ce8a9b0244</password_sha256_hex>` `> ... ` `> </default>` `> ... ` `> </users>` `> ... ` ` > `Copy the code

In combination with server hardware configuration, you can configure the Storage_Configuration to implement multi-volume storage and separate hot and cold data

Query authentication

Single validation

Congratulations, you have successfully entered the world of ClickHouse, start your amazing journey!


Pay attention to “just know programming”, get more dragon carving skills

Clickhouse to get the full package

I’m Aaronoooooo, move on, just move on, even if you don’t understand!