rpm包下载路径:https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/

    [

    ](https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-client-21.8.3.44-2.noarch.rpm)

    https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-common-static-21.8.3.44-2.x86_64.rpm

    https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-common-static-dbg-21.8.3.44-2.x86_64.rpm

    https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-server-21.8.3.44-2.noarch.rpm

    https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-client-21.8.3.44-2.noarch.rpm

    https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/clickhouse-test-21.8.3.44-2.noarch.rpm

    每个rpm安装生成的文件目录

    clickhouse-server安装目录

    /usr/bin/clickhouse-server

    /usr/bin/clickhouse-report

    /usr/bin/clickhouse-odbc-bridge

    /usr/bin/clickhouse-obfuscator

    /usr/bin/clickhouse-format

    /usr/bin/clickhouse-copier

    /etc/security/limits.d/clickhouse.conf

    /etc/init.d/clickhouse-server

    /etc/cron.d/clickhouse-server

    clickhouse-client安装目录

    /usr/bin/clickhouse-local

    /usr/bin/clickhouse-extract-from-config

    /usr/bin/clickhouse-compressor

    /usr/bin/clickhouse-client

    /usr/bin/clickhouse-benchmark

    /etc/clickhouse-client/config.xml

    启动service 生成的目录文件

    /etc/clickhouse-server:配置文件目录,包括:config.xml和users.xml

    /etc/clickhouse-client:客户端配置文件目录

    /var/lib/clickhouse:默认数据目录

    /var/log/clickhouse-server:默认日志目录

    /etc/init.d/clickhouse-server:启动shell脚本

    /etc/security/limits.d/clickhouse.conf:最大文件打开数的配置

    /etc/cron.d/clickhouse-server:定时任务配置,默认没有任务

    /usr/bin/clickhouse-client:clickhouse客户端

    启动检测执行启动命令:sudo /etc/init.d/clickhouse-server start

    停止命令:sudo /etc/init.d/clickhouse-server stop

    登录ClickHouse数据库:clickhouse-client —port 9000

    问题一,启动报错

    Application: DB::Exception: Effective user of the process (root) does not match the owner of the data (clickhouse). Run under ‘sudo -u clickhouse’.

    sudo -u clickhouse clickhouse-server —config-file=/etc/clickhouse-server/config.xml

    问题二,spark写入报错

    ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 210, host: 1.1.1.1, port: 8123; Connect to 1.1.1.1:8123 [/1.1.1.1] failed: Connection refused: connect at ru.yandex.clickhouse.ClickHouseConnectionImpl.initTimeZone(ClickHouseConnectionImpl.java:91) at ru.yandex.clickhouse.ClickHouseConnectionImpl.(ClickHouseConnectionImpl.java:75) at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:58) at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:50) at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:32) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:270)

    1. 创建ClickHouse通用配置文件vi /etc/metrika.xml,在文件中添加如下内容:
    ::/0 2. 打开ClickHouse用户配置文件vi /etc/clickhouse-server/users.xml,找到networks节点,确保该节点下的ip节点值为::/0: ::/0 3. 打开ClickHouse配置文件vi /etc/clickhouse-server/config.xml,找到listen_host节点,将其值修改为:: ::

    [

    ](https://blog.csdn.net/qq_40341628/article/details/109075757)

    [

    ](https://blog.csdn.net/qq_40341628/article/details/109075757)