親測可用:
檢查系統是否支援SSE 4.2:
grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"
安裝:
# 使用腳本下載下傳yum源
curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash
# yum 安裝 server 以及 client
sudo yum install -y clickhouse-server clickhouse-client
# 檢視是否安裝完成
sudo yum list installed 'clickhouse*'
# 啟動server端clickhouse-server
service clickhouse-server start
# 檢視server端服務開啟/關閉狀态
service clickhouse-server status
# 進入client端clickhouse-client
clickhouse-client
解除安裝:
# 解除安裝及删除安裝檔案(需root權限)
yum list installed | grep clickhouse
yum remove -y clickhouse-common-static
yum remove -y clickhouse-server-common
rm -rf /var/lib/clickhouse
rm -rf /etc/clickhouse-*
rm -rf /var/log/clickhouse-server
解除安裝報錯時強制删除:
# 删除rpm包的時候不調用解除安裝腳本
sudo rpm -e clickhouse-server.x86_64 --noscripts
參考資料:
https://blog.csdn.net/qq_37933685/article/details/90477438
https://my.oschina.net/aubao/blog/2244621
https://www.iteye.com/blog/heipark-2028788