Clickhouse currently only supports deployment under Ubuntu, and there are relatively few documents in China
>vi/etc/apt/sources.list
#在最后一行追加
#ubuntu16.04 using xenial:
Deb Http://repo.yandex.ru/clickhouse/xenial Stable Main
#ubuntu14.04 Using trusty:
Deb Http://repo.yandex.ru/clickhouse/Trusty Stable Main
#ubuntu12.04 using precise:
Deb Http://repo.yandex.ru/clickhouse/Precise Stable Main
Save exit
>apt-key adv--keyserver keyserver.ubuntu.com--recv e0c56bd4//Append key
>apt-get Update
>apt-get Install Clickhouse-server-common clickhouse-client-y
>service clickhouse-server Start
Now, if Clickhouse-server can't start,
>tail-10/var/log/clickhouse-server/clickhouse-server.log//View error log What's going on and discover that port 9000 is already occupied
Solve:
>vi/etc/clickhouse-server/config.xml
#找到 <tcp_port>9000</tcp_port> Change 9000 to another port such as: 9001
#还有一个问题就是ipv4和ipv6的问题, if the server does not support IPv6, then the listen_host Colon is removed to its own IP address, or 0.0.0.0 means that all IP can access
#再次启动clickhouse
>service clickhouse-server Restart
>clickhouse-client--port=9001 #指定连接的端口进入
Clickhouse's SQL commands are similar to MySQL, and can be referenced in official documents Https://clickhouse.yandex/docs/en/single/index.html#create-table
Ubuntu under Clickhouse Installation