clickhouse_参数配置(持续更新)

clickhouse 参数配置(持续更新)

  • 远程访问
  • 内存限制
  • 设置数据目录

https://clickhouse.yandex/docs/en/operations/configuration_files/

远程访问

vi /etc/clickhouse-server/config.xml

找到listen_host,放开listen_host注释

1
<listen_host>::</listen_host>

vi /etc/clickhouse-server/users.xml

找到networks节点,确保该节点下的ip节点值为::/0:

1
2
3
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>

内存限制

vi /etc/clickhouse-server/users.xml

1
2
<!-- Maximum memory usage for processing single query, in bytes. -->
<max_memory_usage>10000000000</max_memory_usage>

设置数据目录

vi /etc/clickhouse-server/config.xml

1
2
3
4
5
<!-- Path to data directory, with trailing slash. -->
<path>/var/lib/clickhouse/</path>
<!-- Path to temporary data for processing hard queries. -->
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
坚持原创技术分享,您的支持将鼓励我继续创作!
分享