• Clickhouse 单机双实例


    一、单机安装

    参考:ClickHouse 的安装和使用

    二、修改配置

    logger->log:服务日志存储位置
    logger->errorlog:异常日志存储位置
    http_port:连接端口号
    tcp_port:连接端口号
    path:数据存放路径
    tmp_path:临时数据的存放路径
    user_files_path:用户相关信息的数据
    users_config:用户信息配置文件
    format_schema_path:表结构数据路径

    1、config.xml

    cp  /etc/clickhouse-server/config.xml   /etc/clickhouse-server/config2.xml

    config.xml

    <log>/var/log/clickhouse-server/clickhouse-server.log</log>
    <errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
    <http_port>8123</http_port>
    <tcp_port>9000</tcp_port>
    <mysql_port>9004</mysql_port>
    <interserver_http_port>9009</interserver_http_port>
    <path>/var/lib/clickhouse/</path>
    <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
    <user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
    <format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>

    config2.xml

    <log>/var/log/clickhouse-server2/clickhouse-server2.log</log>
    <errorlog>/var/log/clickhouse-server2/clickhouse-server2.err.log</errorlog>
    <http_port>8124</http_port>
    <tcp_port>9001</tcp_port>
    <mysql_port>9005</mysql_port>
    <interserver_http_port>9010</interserver_http_port>
    <path>/var/lib/clickhouse2/</path>
    <tmp_path>/var/lib/clickhouse2/tmp/</tmp_path>
    <user_files_path>/var/lib/clickhouse2/user_files/</user_files_path>
    <format_schema_path>/var/lib/clickhouse2/format_schemas/</format_schema_path>

    创建对应的文件夹

    1)、  /var/lib/clickhouse2

    cd /var/lib

    mkdir  clickhouse2

    chown -R clickhouse:clickhouse clickhouse2

     2)、/var/log/clickhouse-server2

    cd /var/log

    mkdir clickhouse-server2

    chown -R clickhouse:clickhouse clickhouse-server2

    2、clickhouse-server.service

    cp  /etc/systemd/system/clickhouse-server.service   /etc/systemd/system/clickhouse-server2.service

    clickhouse-server2.service配置如下:

    三、启动

    启动实例1   systemctl start  clickhouse-server.service

    启动实例2 systemctl start  clickhouse-server2.service

    作者:Work Hard Work Smart
    出处:http://www.cnblogs.com/linlf03/
    欢迎任何形式的转载,未经作者同意,请保留此段声明!

  • 相关阅读:
    python的logging库
    python的os库
    python的setup和teardown
    CF339D Xenia and Bit Operations线段树
    poj3311Hie with the Pie状压dp
    poj3254Corn Fields状压Dp
    CF414BMashmokh and ACMDP
    母函数6连杀
    母函数hdu1085
    UVA 1401Remember the WordDp
  • 原文地址:https://www.cnblogs.com/linlf03/p/15390787.html
Copyright © 2020-2023  润新知