clickhose安装

一、在线安装

1、sudo yum install yum-utils
2、sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG
3、sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64

4、安装:
    sudo yum install clickhouse-server clickhouse-client

5、 启动:
 sudo systemctl start clickhouse-server

二、离线安装

1、下载rpm

地址:https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/

或者下载我这里下载好的连接:https://download.youkuaiyun.com/download/u010006625/15469695

2、上传到指定linux服务器例如 /opt/clickhose

3、切换到clickhose目录执行 rpm -ivh * 安装

4、启动

sudo systemctl start clickhouse-server

 

注意事项:

clickhouse默认关闭远程连接,打开需要修改配置:

放开/etc/clickhouse-server/config.xml中的<listen_host>::</listen_host>注释就可以远程连接

clichouse启停命令:

1、启动: sudo systemctl start clickhouse-server

2、停止: sudo systemctl stop clickhouse-server

3、重启: sudo systemctl restart clickhouse-server

三、命令行客户端连接

1、在安装机器上执行:clickhouse-client -m

   执行后输出如下信息:

2、创建库

  CREATE DATABASE IF NOT EXISTS qulity_db

如图:

3、选择该库

use qulity_db

4、创建表


CREATE TABLE qulity_db.dq_data_result1
(

    `id` String,

    `db_id` Int32,

    `table_name` String,

    `major_json` String,

    `status` String,

    `des` String,

    `create_time` DateTime,

    `update_time` DateTime,

    `major_hash_code` String,

    `execute_key` String
)
ENGINE = MergeTree
ORDER BY (id,
 db_id,
 table_name,
 major_hash_code,
 create_time)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值