clickhouselinux安装

1.安装curl系统包

#yum install -y curl

“只有客户发展了,才有我们的生存与发展!”这是创新互联建站的服务宗旨!把网站当作互联网产品,产品思维更注重全局思维、需求分析和迭代思维,在网站建设中就是为了建设一个不仅审美在线,而且实用性极高的网站。创新互联对网站制作、成都网站设计、网站制作、网站开发、网页设计、网站优化、网络推广、探索永无止境。

2.安装clickhouse repositories

#curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh |bash

3.查询clickhouse包

#yum list 'clickhouse*'
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.bit.edu.cn
  • extras: mirror.bit.edu.cn
  • updates: mirror.bit.edu.cn
    Available Packages
    clickhouse-client.x86_64 1.1.54343-1.el7 Altinity_clickhouse
    clickhouse-compressor.x86_64 1.1.54336-3.el7 Altinity_clickhouse
    clickhouse-debuginfo.x86_64 1.1.54343-1.el7 Altinity_clickhouse
    clickhouse-server.x86_64 1.1.54343-1.el7 Altinity_clickhouse
    clickhouse-server-common.x86_64 1.1.54343-1.el7 Altinity_clickhouse
    clickhouse-test.x86_64 1.1.54343-1.el7 Altinity_clickhouse

4.安装clickhouse包

#yum install -y 'clickhouse*'

#yum list installed 'clickhouse*'
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.bit.edu.cn
  • extras: mirror.bit.edu.cn
  • updates: mirror.bit.edu.cn
    Installed Packages
    clickhouse-client.x86_64 1.1.54343-1.el7 @Altinity_clickhouse
    clickhouse-debuginfo.x86_64 1.1.54343-1.el7 @Altinity_clickhouse
    clickhouse-server.x86_64 1.1.54343-1.el7 @Altinity_clickhouse
    clickhouse-server-common.x86_64 1.1.54343-1.el7 @Altinity_clickhouse
    clickhouse-test.x86_64 1.1.54343-1.el7 @Altinity_clickhouse

5.启动数据库

#/etc/init.d/clickhouse-server restart
Start clickhouse-server service: Path to data directory in /etc/clickhouse-server/config.xml: /var/lib/clickhouse/
DONE

6.连接数据库
#clickhouse-client
ClickHouse client version 1.1.54343.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54343.

:)
:)
:) create database testdb;

CREATE DATABASE testdb

Ok.

0 rows in set. Elapsed: 0.003 sec.

:)

:) use testdb

USE testdb

Ok.

0 rows in set. Elapsed: 0.001 sec.

:)

:) CREATE TABLE arrays_test (s String, arr Array(UInt8)) ENGINE = Memory;

CREATE TABLE arrays_test
(
s String,
arr Array(UInt8)
)
ENGINE = Memory

Ok.

0 rows in set. Elapsed: 0.003 sec.

:)

:) INSERT INTO arrays_test VALUES ('Hello', [1,2]), ('World', [3,4,5]), ('Goodbye', [])

INSERT INTO arrays_test VALUES

Ok.

3 rows in set. Elapsed: 0.060 sec.

:)

:) SELECT * FROM arrays_test

SELECT *
FROM arrays_test

┌─s───────┬─arr─────┐
│ Hello │ [1,2] │
│ World │ [3,4,5] │
│ Goodbye │ [] │
└─────────┴─────────┘

3 rows in set. Elapsed: 0.003 sec.

:)

:) SELECT s, arr FROM arrays_test ARRAY JOIN arr

SELECT
s,
arr
FROM arrays_test
ARRAY JOIN arr

┌─s─────┬─arr─┐
│ Hello │ 1 │
│ Hello │ 2 │
│ World │ 3 │
│ World │ 4 │
│ World │ 5 │
└───────┴─────┘

5 rows in set. Elapsed: 0.003 sec.

:)


文章题目:clickhouselinux安装
网站链接:http://bzwzjz.com/article/gjpooj.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 成都网站制作 成都网站建设推广 重庆企业网站建设 移动网站建设 高端网站建设 成都网站制作 移动手机网站制作 广安网站设计 网站建设 成都网站制作 成都网站建设 响应式网站设计方案 成都网站建设公司 app网站建设 梓潼网站设计 重庆外贸网站建设 网站建设改版 网站设计制作报价 泸州网站建设 网站建设费用 成都响应式网站建设 网站建设推广