clickHouse的安装配置流程:

clickHouse的安装配置流程:

本次CH集群设计:4个节点、2分片、2副本

1、首先下载CH的安装包:

(默认下载最新版)
1. curl -s https://packagecloud.io/install/repositories/Altinity/clickhouse/script.rpm.sh | sudo bash
2. yum list 'clickhouse*'
3. yum install -y clickhouse-server clickhouse-client

指定版本安装:
sudo yum install clickhouse-server-common-20.3.12.112-1.el7.x86_64
sudo yum install clickhouse-common-static-20.3.12.112-1.el7.x86_64
sudo yum install clickhouse-server-20.3.12.112-1.el7.x86_64
sudo yum install clickhouse-client-20.3.12.112-1.el7.x86_64

启动命令:service clickhouse-server start

2、更改配置文件:

cd   /etc/clickhouse-server   有一个config.xml配置文件

3、修改配置文件中的参数:
config.xml如下

"1.0"?>
<!--
  NOTE: User and query level settings are set up in "users.xml" file.
-->

    
        <!-- Possible levels: https://github.com/pocoproject/poco/blob/poco-1.9.4-release/Foundation/include/Poco/Logger.h#L105 -->
        trace</level>
        /data/clickhouse_log/clickhouse-server.log</log>
        /data/clickhouse_log/clickhouse-server.err.log</errorlog>
        1000M</size>
        10</count>
        <!-- 1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
    </logger>
    <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
    8123</http_port>
    9000</tcp_port>
    9004</mysql_port>
    <!-- For HTTPS and SSL over native protocol. -->
    <!--
    8443</https_port>
    9440</tcp_port_secure>
    -->

    <!-- Used with https_port and tcp_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
    
         <!-- Used for https server AND secure tcp port -->
            <!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt -->
            /etc/clickhouse-server/server.crt</certificateFile>
            /etc/clickhouse-server/server.key</privateKeyFile>
            <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
            /etc/clickhouse-server/dhparam.pem</dhParamsFile>
            none</verificationMode>
            true</loadDefaultCAFile>
            true</cacheSessions>
            sslv2,sslv3</disableProtocols>
            true</preferServerCiphers>
        </server>

         <!-- Used for connecting to https dictionary source -->
            true</loadDefaultCAFile>
            true</cacheSessions>
            sslv2,sslv3</disableProtocols>
            true</preferServerCiphers>
            <!-- Use for self-signed: none</verificationMode> -->
            
                <!-- Use for self-signed: AcceptCertificateHandler</name> -->
                RejectCertificateHandler</name>
            </invalidCertificateHandler>
        </client>
    </openSSL>

    <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
    <!--
    <![CDATA[-app="SMI2">"http://ui.tabix.io/"></head>
-view="" class="content-ui"></div>

你可能感兴趣的:(clickHouse,clickhouse,数据库,数据仓库,HADOOP,安全,大数据安全)