标签:sea windows run nofile win users nss conf 镜像
# 搜索clickhouse
docker search clickhouse
# 安装image
docker pull clickhouse-server # 服务端
docker pull clickhouse-client # 客户端
# 创建镜像
docker run -d --name=dq_ck_auth -p 8124:8123 -p 9011:9009 -p 9111:9000 --ulimit nofile=262144:262144 cf337fa4bbbe
# 共享配置文件容器创建
docker run -d --name=dq_ck_auth -p 8124:8123 -p 9019:9009 -p 9100:9000 -v /home/daneil/mine/clickhouse/conf/:/etc/clickhouse-server/ --ulimit nofile=262144:262144 cf337fa4bbbe
# 配置文件位置
/etc/clickhouse/
# 启动容器
docker run -it --rm --link dq_ck_auth:clickhouse-server yandex/clickhouse-client --user user_sha256 --password 123 --host clickhouse-server
# 更多操作
docker run -it --rm --link dq_ck_auth:clickhouse-server yandex/clickhouse-client -- help
# 查看当前安装的版本
select version()
# 创建随机密码
PASSWORD=$(base64 < /dev/urandom | head -c8);echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d ‘-‘6lYaUiFi967f3bf355dddfabfca1c9f5cab39352b2ec1cd0b05f9e1e6b8f629705fe7d6e
# 创建sha1密码
echo -n 123 | openssl dgst -sha256
# 创建doubel_sha1密码
echo -n 123 | openssl dgst -sha1 -binary | openssl dgst -sha1
# 配置密码 -- /etc/clickhouse/users.xml
<users>
<default>
<password></password>
<networks>
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</default>
<dba>
<password>4JEaxKRL</password>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</dba>
<user_sha256>
<password>4JEaxKRL</password>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</user_sha256>
<user_sha1>
<password>4JEaxKRL</password>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</user_sha1>
</users>
sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb https://repo.clickhouse.tech/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y clickhouse-server clickhouse-client # 安装server和client
systemctl start clickhouse-server.service # 启动服务
clickhouse-client # 开启客户端
标签:sea windows run nofile win users nss conf 镜像
原文地址:https://www.cnblogs.com/Daneil/p/14988659.html