「ClickHouse」:修訂間差異
跳至導覽
跳至搜尋
無編輯摘要 |
|||
(未顯示同一使用者於中間所作的 10 次修訂) | |||
第1行: | 第1行: | ||
=== 外部連結 | '''ClickHouse'''是一個OLAP資料庫。 | ||
== 安裝 == | |||
<syntaxhighlight lang="bash"> | |||
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/clickhouse-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8919F6BD2B48D754; sudo chmod a+r /usr/share/keyrings/clickhouse-keyring.gpg; echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list; sudo apt update; sudo apt install clickhouse-client clickhouse-server | |||
</syntaxhighlight> | |||
== 啟動 == | |||
預設是不會啟動的,需要手動啟動: | |||
<syntaxhighlight lang="bash"> | |||
sudo service clickhouse-server | |||
</syntaxhighlight> | |||
如果希望開機自動跑起來的話需要設定: | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl enable clickhouse-server | |||
</syntaxhighlight> | |||
== 使用 == | |||
透過<code>clickhouse-client</code>連上: | |||
<syntaxhighlight lang="bash"> | |||
clickhouse-client --password | |||
</syntaxhighlight> | |||
或是[[MySQL]]協定: | |||
<syntaxhighlight lang="bash"> | |||
mysql --protocol tcp -u default -p -P 9004 | |||
</syntaxhighlight> | |||
或是PostgreSQL協定,但有可能會需要額外設定<ref>{{Cite web |url=https://github.com/ClickHouse/ClickHouse/issues/28159 |title=I can not connect via postgres interface #28159 |language=en |accessdate=2022-07-15}}</ref>: | |||
<syntaxhighlight lang="bash"> | |||
psql -p 9005 -h 127.0.0.1 -U default default | |||
</syntaxhighlight> | |||
== 參考文獻 == | |||
{{Reflist|2}} | |||
== 外部連結 == | |||
* {{Official|https://clickhouse.com/}} {{en}} | * {{Official|https://clickhouse.com/}} {{en}} | ||
* {{Official|https://github.com/ClickHouse/ClickHouse|ClickHouse的GitHub}} {{en}} | * {{Official|https://github.com/ClickHouse/ClickHouse|ClickHouse的GitHub}} {{en}} | ||
[[Category:軟體]] |
於 2023年10月11日 (三) 09:02 的最新修訂
ClickHouse是一個OLAP資料庫。
安裝
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/clickhouse-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8919F6BD2B48D754; sudo chmod a+r /usr/share/keyrings/clickhouse-keyring.gpg; echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list; sudo apt update; sudo apt install clickhouse-client clickhouse-server
啟動
預設是不會啟動的,需要手動啟動:
sudo service clickhouse-server
如果希望開機自動跑起來的話需要設定:
sudo systemctl enable clickhouse-server
使用
透過clickhouse-client
連上:
clickhouse-client --password
或是MySQL協定:
mysql --protocol tcp -u default -p -P 9004
或是PostgreSQL協定,但有可能會需要額外設定[1]:
psql -p 9005 -h 127.0.0.1 -U default default
參考文獻
- ↑ I can not connect via postgres interface #28159. [2022-07-15] (English).
外部連結
- 官方網站 (英文)
- ClickHouse的GitHub (英文)