• clickhouse编译安装


    环境:

    Os:Centos 7

    1.编译安装,注意安装前添加用户
    export LATEST_VERSION=$(curl -s https://repo.clickhouse.tech/tgz/stable/ |  grep -Eo '[0-9]+.[0-9]+.[0-9]+.[0-9]+' | sort -V -r | head -n 1)
    curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-common-static-$LATEST_VERSION.tgz
    curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-common-static-dbg-$LATEST_VERSION.tgz
    curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-server-$LATEST_VERSION.tgz
    curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-client-$LATEST_VERSION.tgz

    tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz
    sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh

    tar -xzvf clickhouse-common-static-dbg-$LATEST_VERSION.tgz
    sudo clickhouse-common-static-dbg-$LATEST_VERSION/install/doinst.sh

    tar -xzvf clickhouse-server-$LATEST_VERSION.tgz
    sudo clickhouse-server-$LATEST_VERSION/install/doinst.sh
    sudo /etc/init.d/clickhouse-server start

    tar -xzvf clickhouse-client-$LATEST_VERSION.tgz
    sudo clickhouse-client-$LATEST_VERSION/install/doinst.sh

    2.修改配置文件
    [root@localhost clickhouse-client]# vi /etc/clickhouse-server/config.xml
    将如下行注释掉
        <listen_host>::1</listen_host>

    3.重启动
    [root@localhost clickhouse-client]# clickhouse restart

    4.登陆
    [root@localhost clickhouse-client]# clickhouse-client --host=localhost
    ClickHouse client version 20.10.3.30 (official build).
    Connecting to localhost:9000 as user default.
    Connected to ClickHouse server version 20.10.3 revision 54441.

    localhost :) exit

    5.修改数据路径
    vi /etc/clickhouse-server/config.xml

    <path>/var/lib/clickhouse/</path>

    6.修改日志路径
    vi /etc/clickhouse-server/config.xml

        <logger>
            <!-- Possible levels: https://github.com/pocoproject/poco/blob/poco-1.9.4-release/Foundation/include/Poco/Logger.h#L105 -->
            <level>trace</level>
            <log>/var/log/clickhouse-server/clickhouse-server.log</log>
            <errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
            <size>1000M</size>
            <count>10</count>
            <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->

            <!-- Per level overrides (legacy):

            For example to suppress logging of the ConfigReloader you can use:
            NOTE: levels.logger is reserved, see below.
            -->
            <!--
            <levels>
              <ConfigReloader>none</ConfigReloader>
            </levels>
            -->

            <!-- Per level overrides:

            For example to suppress logging of the RBAC for default user you can use:
            (But please note that the logger name maybe changed from version to version, even after minor upgrade)
            -->
            <!--
            <levels>
              <logger>
                <name>ContextAccess (default)</name>
                <level>none</level>
              </logger>
              <logger>
                <name>DatabaseOrdinary (test)</name>
                <level>none</level>
              </logger>
            </levels>
            -->
        </logger>

  • 相关阅读:
    SimpleXML读写XML文件以及json的读写
    XMLWriter和XMLReader读写XML文件
    保护眼睛——设置WIN7和XP 窗体、PDF、网页背景颜色(IE、Chrome、Firefox)
    DevExpress Winform通用控件开发总结
    SQL Server远程连接设置
    JSON-C库的使用(2)Json对象的遍历
    JSON-C库的使用(1)Json对象数组的解析
    SQL Server数据类型,System.Data.SqlDbType,.NET数据类型
    4.2 access函数实例
    4.1 对每个命令行参数打印文件类型
  • 原文地址:https://www.cnblogs.com/hxlasky/p/13903343.html
Copyright © 2020-2023  润新知