centos使用docker安装clickhouse

 

拉取镜像

docker pull yandex/clickhouse-server:20.3.12.112

 

启动

docker run -d --name=clickhouse-server -p 8123:8123  -p 9000:9000 -p 9009:9009 --ulimit nofile=262144:262144 -v /home/data/clickhouse/data:/var/lib/clickhouse:rw -v /home/data/clickhouse/conf/config.xml:/etc/clickhouse-server/config.xml -v /home/data/clickhouse/conf/users.xml:/etc/clickhouse-server/users.xml -v /home/data/clickhouse/log:/var/log/clickhouse-server:rw yandex/clickhouse-server:20.3.12.112

 

docker-compose.yml文件

version: '3'
services:
  clickhouse-server:
    image: yandex/clickhouse-server:20.3.12.112
    restart: unless-stopped
    #network_mode: "host"
    privileged: true
    container_name: clickhouse-server
    environment:
    - TZ=Asia/Shanghai
    volumes:
    - /data/clickhouse/log:/var/log/clickhouse-server
    - /data/clickhouse/conf/config.xml:/etc/clickhouse-server/config.xml
    - /data/clickhouse/conf/users.xml:/etc/clickhouse-server/users.xml
    - /data/clickhouse/data:/var/lib/clickhouse
    ports:
    - 8123:8123
    - 9000:9000
    - 9009:9009

 

 

clickhouse配置登录密码参考:https://www.cnblogs.com/pxblog/p/15565911.html

posted @ 2021-06-29 16:10  yvioo  阅读(669)  评论(0编辑  收藏  举报