lenmom

博客园 首页 新随笔 联系 订阅 管理

1. downlod click house server docker images

sudo docker pull yandex/clickhouse-server:19.9

Note: you can choose the download the  most fitable version by browsing the docker hub web site, in my practice, I used v19.9

 

2. start click house server docker container

docker run -d --name lenmom-clickhouse-server                  \ 
--ulimit nofile=262144:262144                                  \
-v $HOME/some_clickhouse_database:/var/lib/clickhouse          \
-v /path/to/your/config.xml:/etc/clickhouse-server/config.xml  \
yandex/clickhouse-server:19.9 

Note: if we don't want to customize configuration, we can ommit the volumn to config.xml

for quick start click-house server, you can use the command as follows:

 

sudo docker run -d --name lenmom-clickhouse-server --ulimit nofile=262144:262144  yandex/clickhouse-server:19.9

 

 

 3. download click house client docker image

sudo docker pull yandex/clickhouse-client:19.9

 

4. connect to click house server using client

sudo docker run -it  --name lenmom-clickhouse-client --link lenmom-clickhouse-server:clickhouse-server yandex/clickhouse-client:19.9 --host clickhouse-server

after connected to the click-house server, it shows as follows:

 

posted on 2019-07-04 20:55  老董  阅读(393)  评论(0)    收藏  举报