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
-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------
(蓝奏云官网有些地址失效了,需要把请求地址lanzous改成lanzoux才可以)