环境说明:
目前已验证: openeuler22.03 LTS SP3,openeuler22.03 LTS SP4
clickhouse 版本: 24.9.2
$ yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo
$ yum install -y clickhouse-server clickhouse-client
$ vim /etc/clickhouse-server/users.xml
<password>srebro@2024</password>
$ vim /etc/clickhouse-server/config.xml
#搜索0.0.0.0 ,然后粘贴下面的内容
<listen_host>::</listen_host>
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/
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/
$ chown -Rf clickhouse:clickhouse /home/application/clickhouse
$ chown -Rf clickhouse:clickhouse /home/application/clickhouse-server
systemctl start clickhouse-server
systemct enable clickhouse-server
$ 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.