ClickHouse常用配置

编辑配置文件/etc/clickhouse-server/config.xml

1、允许远程访问

用于限制来源主机的请求

    
    
    
    

(1)允许IP4和IP6源主机远程访问

::

(2)仅允许IP4主机远程访问

0.0.0.0

(3)仅允许本地访问

    
    

(4)我的设置

     
    :: 
    
    

    
    

2、数据目录

(1)设置参数如下

    
    /data/clickhouse/

    
    /data/clickhouse/tmp/

(2)创建目录

[root@client app]# mkdir -p /data/clickhouse
[root@client app]# chown -R clickhouse:clickhouse /data/clickhouse

(3)重启服务,查看数据目录

[root@client app]# systemctl restart clickhouse-server
[root@client app]# ll /data/clickhouse/
total 28
drwxr-x--- 4 clickhouse clickhouse 4096 Sep 11 15:23 data
drwxr-x--- 2 clickhouse clickhouse 4096 Sep 11 15:23 dictionaries_lib
drwxr-x--- 2 clickhouse clickhouse 4096 Sep 11 15:23 flags
drwxr-x--- 4 clickhouse clickhouse 4096 Sep 11 15:23 metadata
drwxr-x--- 2 clickhouse clickhouse 4096 Sep 11 15:23 preprocessed_configs
-rw-r----- 1 clickhouse clickhouse   59 Sep 11 15:23 status
drwxr-x--- 2 clickhouse clickhouse 4096 Sep 11 15:23 tmp
[root@client app]#

你可能感兴趣的:(ClickHouse笔记)