OpenEuler 22.03 LTS 部署Clickhouse
-
环境说明:
- 目前已验证: openeuler22.03 LTS SP3,openeuler22.03 LTS SP4
- clickhouse 版本: 24.9.2
一、Clickhouse 在线安装
1.1 添加clickhouse repo源
$ yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo
1.2 在线安装
$ yum install -y clickhouse-server clickhouse-client
二、Clickhouse 配置
2.1配置客户端连接密码
$ vim /etc/clickhouse-server/users.xml
<password>srebro@2024</password>
2.2 配置监听地址
$ vim /etc/clickhouse-server/config.xml
#搜索0.0.0.0 ,然后粘贴下面的内容
<listen_host>::</listen_host>
2.3 创建软连接配置数据路径
clickhouse安装后,默认的数据目录在/var/lib/clickhouse,我们的磁盘默认挂载在/home/application 路径下;将其软连接到 /home/application/clickhouse 下
$ mkdir -p /home/application/clickhouse
$ rm -rf /var/lib/clickhouse/
$ ln -s /home/application/clickhouse /var/lib/
2.4 创建软连接配置日志路径
clickhouse安装后,默认的数据目录在/var/log/clickhouse-server,我们的磁盘默认挂载在/home/application 路径下;将其软连接到 /home/application/clickhouse-server/ 下
$ mkdir -p /home/application/clickhouse-server/
$ rm -rf /var/log/clickhouse-server
$ ln -s /home/application/clickhouse-server/ /var/log/
2.5 赋予clickhouse 目录权限
$ chown -Rf clickhouse:clickhouse /home/application/clickhouse
$ chown -Rf clickhouse:clickhouse /home/application/clickhouse-server
三、启动clickhouse-server数据库
systemctl start clickhouse-server
systemct enable clickhouse-server
四、客户端clickhouse-client 登陆测试
$ clickhouse-client --password
ClickHouse client version 20.4.6.53 (official build).
Password for user (default):
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.4.6 revision 54434.
0001 :) exit
Bye.
- 感谢你赐予我前进的力量
赞赏者名单
因为你们的支持让我意识到写文章的价值🙏
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 运维小弟
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果