Debian/Ubuntu安装Clickhouse
ClickHouse 是俄罗斯的 Yandex 于 2016 年开源的用于在线分析处理查询(OLAP :Online Analytical Processing)MPP架构的列式存储数据库(DBMS:Database Management System),能够使用 SQL 查询实时生成分析数据报告。ClickHouse的全称是Click Stream,Data WareHouse。
1 安装依赖
sudo apt-get install dirmngr
2 添加源
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
3 安装
sudo apt-get install -y clickhouse-server clickhouse-client
sudo systemctl start clickhouse-server
sudo systemctl enable clickhouse-server
clickhouse-server
安装过程中会提示输入密码。
注意windows的WSL2下Ubuntu是没有systemctl
的,所以只能用service来启动
4 手动或指定版本安装
下载地址
需要下载clickhouse-client
,clickhouse-server
,clickhouse-common-static
安装命令
dpkg -i clickhouse-common-static_22.2.2.1_amd64.deb
dpkg -i clickhouse-client_22.2.2.1_all.deb
dpkg -i clickhouse-server_22.2.2.1_all.deb
5 连接
clickhouse-client --host localhost --port 9000 --password 密码
至此单个服务的Clickhouse安装成功。
6 卸载
systemctl stop clickhouse-server
apt-get remove -y clickhouse-common-static
apt-get remove -y clickhouse-server-common
rm -rf /var/lib/clickhouse
rm -rf /etc/clickhouse-*
rm -rf /var/log/clickhouse-server
发表回复