1.查看 clickhouse-server 服务状态
systemctl status clickhouse-server
如果是active需要先关闭服务
systemctl stop clickhouse-server
2.卸载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
3.安装clickhouse
sudo yum install yum-utils
sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG
sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/clickhouse.repo
sudo yum install clickhouse-server clickhouse-client
systemctl start clickhouse-server
4.启动clickhouse客户端
clickhouse-client -m