CentOS 7.9にClickHouseをインストールする
環境
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
インストールの方法
1.packagecloudリポジトリを追加します
# sudo yum install -y curl # curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash
2.指向型データベースClickHouseをインストールします
# sudo yum install -y clickhouse-server clickhouse-client
3.ClickHouseを実行します
ClickHouseを起動します
# sudo systemctl start clickhouse-server
ClickHouse自動起動を有効にします
# sudo systemctl enable clickhouse-server clickhouse-server.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig clickhouse-server on
ステータスを確認します
# sudo systemctl enable clickhouse-server clickhouse-server.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig clickhouse-server on [root@localhost ~]# sudo systemctl status clickhouse-server ● clickhouse-server.service - LSB: Yandex clickhouse-server daemon Loaded: loaded (/etc/rc.d/init.d/clickhouse-server; bad; vendor preset: disabled) Active: active (exited) since 水 2021-12-29 09:02:20 JST; 1min 9s ago
4.ClickHouseに接続します
# clickhouse-client ClickHouse client version 20.8.3.18. Connecting to localhost:9000 as user default. Connected to ClickHouse server version 20.8.3 revision 54438. localhost :) select 1 SELECT 1 lq1qk x 1 x mqqqj 1 rows in set. Elapsed: 0.003 sec. localhost :) exit Bye.