安装说明
本次安装为Docker环境下的ClickHouse,单节点,伪分布式,单分片。
配置文件
检查此文件中的端口,避免端口冲突。
config.xml
检查此文件的每一项配置。
metrika.xml
Docker文件
docker-compose.yml文件
version: '3.8'
services:
clickhouse:
container_name: clickhouse
image: clickhouse/clickhouse-server:22.9.7.34
restart: always
privileged: true
environment:
- TZ=Asia/Shanghai
- CLICKHOUSE_USER=clickhouse # 用户
- CLICKHOUSE_PASSWORD=123456 # 密码
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
volumes:
- /data/clickhouse/data:/var/lib/clickhouse
- /logs/clickhouse:/val/log/clickhouse-server
- /data/clickhouse/conf/config.xml:/etc/clickhouse-server/config.xml
- /data/clickhouse/conf/metrika.xml:/etc/clickhouse-server/config.d/metrika.xml
- /etc/hosts:/etc/hosts
hostname: bigdata3
ulimits:
nofile:
soft: 262144
hard: 262144
network_mode: 'host'
启动容器:# docker-compose -f docker-compose.yml up -d clickhouse