ClickHouse单机安装配置
一、解压
1. 将Master节点ClickHouse相关安装包解压到/opt/module/clickhouse目录下
tar -zxvf clickhouse-client-21.9.4.35.tgz -C /opt/module/clickhouse/
tar -zxvf clickhouse-common-static-21.9.4.35.tgz -C /opt/module/clickhouse/
tar -zxvf clickhouse-common-static-dbg-21.9.4.35.tgz -C /opt/module/clickhouse/
tar -zxvf clickhouse-server-21.9.4.35.tgz -C /opt/module/clickhouse/
2. 执行启动各个相关脚本
cd /opt/module/clickhouse
./clickhouse-client-21.9.4.35/install/doinst.sh
./clickhouse-common-static-21.9.4.35/install/doinst.sh
./clickhouse-common-static-dbg-21.9.4.35/install/doinst.sh
./clickhouse-server-21.9.4.35/install/doinst.sh
3. 设置远程访问并移除默认监听文件(listen.xml),同时由于9000端口被hadoop占用,需要将clickhouse的端口更改为9001
进入ClickHouse的配置目录:
cd /etc/clickhouse-server
给文件config.xml给权限:chmod 777 config.xml
编辑config.xml文件:
取消掉<!-- <listen_host>0.0.0.0</listen_host> -->的注释变为:<listen_host>0.0.0.0</listen_host>
将里面所有的9000变成9001
4. 启动clickhouse,启动后查看clickhouse运行状态
- 启动clickhouse:
systemctl start clickhouse-server
- 查看clickhouse运行状态:
systemctl status clickhouse-server