ClickHouse学习笔记之安装配置

介绍

ClickHouse是俄罗斯公司Yandex推出的列式存储数据库,不依赖于Hadoop生态,用于在线分析处理查询,通过SQL查询实时生成分析数据报告。

官网:https://clickhouse.com/,本笔记记载CentOS7下ClickHouse21.11的学习过程

安装、配置和启动

按照官网的指示即可:

sudo yum install yum-utils
sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG
sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/clickhouse.repo
sudo yum install clickhouse-server clickhouse-client

然后修改/etc/clickhouse-server/config.xml文件

[root@scentos szc]# vim /etc/clickhouse-server/config.xml

::的注释打开,以便其他机器通过clickhouse-client -h ip -p port访问server

     <listen_host>::listen_host>

而后启动server

[root@scentos szc]# systemctl start clickhouse-server

并用客户端连接

[root@scentos szc]# clickhouse-client -m

结果如下图所示:
ClickHouse学习笔记之安装配置_第1张图片

常用路径

数据目录

/var/lib/clickhouse/

[root@scentos szc]# ll /var/lib/clickhouse/
total 8
drwxr-x---  2 clickhouse clickhouse 116 Dec 10 16:26 access
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 backups
drwxr-x---  4 clickhouse clickhouse  35 Dec 10 16:26 data
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 dictionaries_lib
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 flags
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 format_schemas
drwxr-x---  4 clickhouse clickhouse 184 Dec 10 16:26 metadata
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 21:15 metadata_dropped
drwxr-x---  2 clickhouse clickhouse  41 Dec 10 16:26 preprocessed_configs
-rw-r-----  1 clickhouse clickhouse  59 Dec 10 16:26 status
drwxr-x--- 22 clickhouse clickhouse 226 Dec 10 21:15 store
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 tmp
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 user_defined
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 user_files
drwxr-x---  2 clickhouse clickhouse   6 Dec 10 16:26 user_scripts
-rw-r-----  1 clickhouse clickhouse  36 Dec 10 16:26 uuid

日志文件路径

/var/log/clickhouse-server/clickhouse-server.log

[root@scentos szc]# ll /var/log/clickhouse-server/clickhouse-server.log
-rw-r----- 1 clickhouse clickhouse 15675806 Dec 10 21:23 /var/log/clickhouse-server/clickhouse-server.log

配置文件路径

/etc/clickhouse-server/config.xml

你可能感兴趣的:(大数据组件,数据库,clickhouse)