[root@hadoop102 ~]# yum install -y libtool
[root@hadoop102 ~]# yum install -y *unixodbc*
官網:
1[root@hadoop102 software]# ls
2 clickhouse-client-1.1.54236-4.el6.x86_64.rpm
3 clickhouse-server-1.1.54236-4.el6.x86_64.rpm
4 clickhouse-compressor-1.1.54236-4.el6.x86_64.rpm
5 clickhouse-server-common-1.1.54236-4.el6.x86_64.rpm
6 clickhouse-debuginfo-1.1.54236-4.el6.x86_64.rpm
1 [root@hadoop102 software]# rpm -ivh *.rpm preparing... ########################################### [100%]2 1:clickhouse-server- commo########################################### [ 20%]
3 2:clickhouse-server ########################################### [ 40%]
4 3:clickhouse-client
5 大資料技術之 clickhouse ########################################### [ 60%]
6 4:clickhouse-debuginfo ########################################### [ 80%]
7 5:clickhouse-compressor ########################################### [100%]
1 [root@hadoop102 software]# nohup clickhouse-server --config- file=/etc/clickhouse-server/config.xml >null 2>&1 &
注:
>null --重定向輸出2>&1 --重定向繫結;詳見另一篇:
5.啟動客戶端
[root@hadoop102 software]# clickhouse-clientclickhouse client version 1.1.54236.
connecting to localhost:9000.
connected to clickhouse server version 1.1.54236.
:)
整形,浮點型,布林,字串,列舉,陣列,元組,日期
tinylog,memory,merge,mergetree,replacingmergetre,ummingmergetree,distribuated
基本語法:create table [if not exists] [db.]table_name [on cluster cluster] ( name1 [type1] [default|materialized|alias expr1], name2 [type2] [default|materialized|alias expr2], ... ) engine =engine直接建立:
:) create table t1(id uint16,name string) engine=tinylog
複製表結構建立:
:) create table t2 as t1 engine=memory
複製指定表的指定列建立:
:) create table t3 engine=tinylog as select * from t1
直接插入::) insert into t1 values(1,'zhangsan'),(2,'lisi'),(3,'wangwu')
插入指定表中的指定資料:
:) insert into t2 select * from t3
alter 只支援 mergetree 系列,merge 和 distributed 引擎的表,基本語法:
alter table [db].name [on cluster cluster] add|drop|modify
column ...
引數解析:
add column – 向表中新增新列
drop column – 在表中刪除列
modify column – 更改列的型別
新增指定列:)alter table mt_table add column age uint8
修改指定列
:)alter table mt_table modify column age uint16
刪除指定列
:)alter table mt_table drop column age
:)desc mt_table
檢查表中的資料是否損壞,他會返回兩種結果:
0 – 資料已損壞
1 – 資料完整
該命令只支援 log,tinylog 和 stripelog 引擎。
mysql常用知識點 mysql 常用知識點。
mysql u root p show databases show tables select from abc order by id limit 0,10 create database bbb exit mysqldump u root p game home backup.sql mysq...
shell常用知識點
0 shell中if,while的條件語句怎麼寫 test和 字串比較 數字比較 g,l,e,n,q,t的組合 greater than,less than,equil,not equil,greater equil,less equil 1 shell的字串 str hello str hello...
Oracle常用知識點
oracle的預設賬號及密碼有以下三種 1.使用者名稱 sys密碼 change on install 2.使用者名稱 system密碼 manager 3.使用者名稱 scott密碼 tiger 注意登陸模式不是normal select 分組的列,sum 要求和的列 from 表 group b...