Last active
April 24, 2023 01:04
-
-
Save ipetrushin/97db3ba7b8130af8c553c3304836e0e3 to your computer and use it in GitHub Desktop.
ClickHouse connect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Установите сертификат: | |
sudo mkdir --parents /usr/local/share/ca-certificates/Yandex && \ | |
sudo wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" \ | |
--output-document /usr/local/share/ca-certificates/Yandex/YandexInternalRootCA.crt && \ | |
sudo chmod 655 /usr/local/share/ca-certificates/Yandex/YandexInternalRootCA.crt | |
#Подключите DEB-репозиторий ClickHouse: | |
sudo apt update && sudo apt install --yes apt-transport-https ca-certificates dirmngr | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 | |
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ | |
/etc/apt/sources.list.d/clickhouse.list | |
sudo apt-get update | |
#Установите зависимости: | |
sudo apt install --yes clickhouse-client | |
#Загрузите файл конфигурации для clickhouse-client: | |
mkdir --parents ~/.clickhouse-client && \ | |
wget "https://storage.yandexcloud.net/doc-files/clickhouse-client.conf.example" \ | |
--output-document ~/.clickhouse-client/config.xml | |
#Пример строки подключения: | |
clickhouse-client --host rc1a-7ut3ob6t69958voj.mdb.yandexcloud.net \ | |
--secure \ | |
--user user \ | |
--database db \ | |
--port 9440 \ | |
--ask-password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment