1. 下载离线安装包,下四个包,版本号要一致, (在此下的是20.8.3.18-1.el7.x86_64版)
clickhouse-server, clickhouse-client, clickhouse-common-static, clickhouse-server-common
Altinity/clickhouse - Packages · packagecloudBrowse packages for the Altinity/clickhouse repository. Host your own repository by creating an account on packagecloud.https://packagecloud.io/altinity/clickhouse2. 拷安装包到/disk/tool/install中,并进入到/disk/tool/install目录下。注意按顺序进行下面安装
3. 输入:rpm -ivh clickhouse-common-static-20.8.3.18-1.el7.x86_64.rpm
4. 输入:rpm -ivh clickhouse-server-common-20.8.3.18-1.el7.x86_64.rpm
5. 输入:rpm -ivh clickhouse-server-20.8.3.18-1.el7.x86_64.rpm
6. 输入:rpm -ivh clickhouse-client-20.8.3.18-1.el7.x86_64.rpm
7.输入:vim /etc/clickhouse-server/config.xml
8. 修改<!-- <listen_host>::</listen_host> -->为:<listen_host>::</listen_host> ,防止连接的时候报错
9. 输入:vim /etc/clickhouse-server/users.xml 找到<password></password>,设密码。
11.输入:service clickhouse-server start 启动服务
12. 输入:systemctl enable clickhouse-server 设置开机启动
13. 输入:systemctl start clickhouse-server 开启服务
14. 输入:systemctl status clickhouse-server 查看状态
15 输入:clickhouse-client 验证客户端是否正常。 完成安装
(有密码用下面语句: clickhouse-client --password mykey )
clickhouse 服务常用操作:
启动服务:service clickhouse-server start
重启服务:systemctl restart clickhouse-server
停止服务:service clickhouse-server stop