这里写自定义目录标题
ClickHouse安装包地址
http://repo.yandex.ru/clickhouse/
因为我们使用tgz包进行安装,所以我们进入tgz目录下,再选择stable目录。
要下载的包有四个,分别是
clickhouse-client
clickhouse-server
clickhouse-common-static
clickhouse-common-static-dbg
选择后缀为tgz的进行下载。
我这边选择最新的版本22.2.2.1,所以下载地址为
http://repo.yandex.ru/clickhouse/tgz/stable/clickhouse-client-22.2.2.1.tgz
http://repo.yandex.ru/clickhouse/tgz/stable/clickhouse-common-static-22.2.2.1.tgz
http://repo.yandex.ru/clickhouse/tgz/stable/clickhouse-common-static-dbg-22.2.2.1.tgz
http://repo.yandex.ru/clickhouse/tgz/stable/clickhouse-server-22.2.2.1.tgz
安装
下载好四个包后上传到服务器,对他们进行解压。
tar -zxvf clickhouse-common-static-22.2.2.1.tgz
tar -zxvf clickhouse-common-static-dbg-22.2.2.1.tgz
tar -zxvf clickhouse-server-22.2.2.1.tgz
tar -zxvf clickhouse-client-22.2.2.1.tgz
得到四个目录,每个目录中都有install\doinst.sh安装脚本。
执行安装脚本
./clickhouse-common-static-22.2.2.1/install/doinst.sh
./clickhouse-common-static-dbg-22.2.2.1/install/doinst.sh
./clickhouse-client-22.2.2.1/install/doinst.sh
./clickhouse-server-22.2.2.1/install/doinst.sh
不一定按顺序,但是需要注意的是,前三个脚本无输出,server的安装脚本会要求输入几个参数。
第一个是默认用户的密码,第二个是是否允许远程链接,这里我选y允许远程连接。
部署
安装完成后,脚本提示启动ClickHouse服务的命令和连接ClickHouse的命令
clickhouse start
clickhouse-client --password
输入密码后,就连接上了clickhouse。
至此clickhouse安装部署完成。