1、sudo apt-get install -y apt-transport-https ca-certificates dirmngr
2、sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
3、echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list
4、sudo apt-get update
5、sudo apt-get install -y clickhouse-server clickhouse-client
输入密码 admin
6、sudo service clickhouse-server start文章来源:https://www.toymoban.com/news/detail-654779.html
7、clickhouse-client --password admin
8、查看表创建命令 show create table default.wd文章来源地址https://www.toymoban.com/news/detail-654779.html
CREATE TABLE default.wd
(
`IMEI` UInt64,
`temperature` Float32,
`humidity` Float32,
`signal` UInt8,
`voltage` UInt8,
`collectTime` DateTime,
`admin_id` UInt8
)
ENGINE = ReplacingMergeTree(IMEI)
PARTITION BY toYYYYMM(collectTime)
PRIMARY KEY IMEI
ORDER BY (IMEI, collectTime)
SETTINGS index_granularity = 8192
到了这里,关于clickhouse新建服务器流程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!