Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install clickhouse

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install clickhouse, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

Install from DEB package

It is recommended that you use the official precompiled deb package for Debian or Ubuntu. Run the following command to install the package:

Sudo apt-get install apt-transport-https ca-certificates dirmngrsudo apt-key adv-- keyserver hkp://keyserver.ubuntu.com:80-- recv E0C56BD4echo "deb https://repo.clickhouse.tech/deb/stable/ main/" | sudo tee\ / etc/apt/sources.list.d/clickhouse.listsudo apt-get updatesudo apt-get install-y clickhouse-server clickhouse-clientsudo service clickhouse-server startclickhouse-client from RPM package

It is recommended that you use the official precompiled rpm package for CentOS,RedHat and all other rpm-based Linux distributions.

First, you need to add the official repository:

Sudo yum install yum-utilssudo rpm-import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPGsudo yum-config-manager-add-repo https://repo.clickhouse.tech/rpm/stable/x86_64

Then run the following command to install the package:

Sudo yum install clickhouse-server clickhouse-client is from Tgz.

It is recommended that you use a precompiled official tgz archive in all Linux distributions that cannot install deb or rpm packages.

You can download the desired version from the repository https://repo.clickhouse.tech/tgz/ using curl or wget.

After that, you should unzip the downloaded archive and install it using the installation script. Examples of the latest version:

Export LATEST_VERSION= `curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2 > / dev/null | grep-Eo'[0-9] +\. [0-9] +\. [0-9] +'| head-n 1`curl-O https://repo.clickhouse.tech/tgz/clickhouse-common-static-$LATEST_VERSION.tgzcurl-O https://repo.clickhouse.tech/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgzcurl- O https://repo.clickhouse.tech/tgz/clickhouse-server-$LATEST_VERSION.tgzcurl-O https://repo.clickhouse.tech/tgz/clickhouse-client-$LATEST_VERSION.tgztar-xzvf clickhouse-common-static-$LATEST_VERSION.tgzsudo clickhouse-common-static-$LATEST_VERSION/install/doinst.shtar-xzvf clickhouse-common-static-dbg-$LATEST_VERSION.tgzsudo clickhouse-common-static-dbg-$LATEST_VERSION/install/doinst.shtar-xzvf clickhouse-server-$LATEST_VERSION.tgzsudo clickhouse-server- $LATEST_VERSION/install/doinst.shsudo / etc/init.d/clickhouse-server starttar-xzvf clickhouse-client-$LATEST_VERSION.tgzsudo clickhouse-client-$LATEST_VERSION/install/doinst.sh run

Start the server as a daemon

$sudo service clickhouse-server start

Without a service command,

$sudo / etc/init.d/clickhouse-server start

If the server is not started, check the configuration in the file / etc/clickhouse-server/config.xml.

You can also start the server manually from the console:

$clickhouse-server-config-file=/etc/clickhouse-server/config.xml

In this case, the log will be printed to the console, which is very convenient during the development process.

If the configuration file is in the current directory, you do not need to specify the-- config-file parameter. By default, it uses. / config.xml.

ClickHouse supports access restriction settings. They are located in the users.xml file (next to config.xml).

By default, the default user can access it from anywhere without entering a password.

After starting the server, you can connect to it using a command line client:

$clickhouse-client

By default, it represents the user to connect to localhost:9000 by default without entering a password. You can also use the-- host parameter to connect to a remote server

The terminal must use UTF-8 encoding.

$. / clickhouse-clientClickHouse client version 0.0.18749.Connecting to localhost:9000.Connected to ClickHouse server version 0.0.18749.) SELECT 1SELECT 1 ┌─ 1 ─┐│ 1 │└───┘ 1 rows in set. Elapsed: 0.003 sec.:) these are all the contents of the article "how to install clickhouse". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report