What is clickhouse?
ClickHouse is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP). In a “normal” row-oriented DBMS, data is stored row-wise, that is all the values related to a row are physically stored next to each other. In a column-oriented DBMS, data is stored column-wise, that is the values from different columns are stored separately, and data from the same column is stored together.
How to install clickhouse on MAC OS?
1 2 3 4 5 6 |
## download the installer wget 'https://builds.clickhouse.com/master/macos/clickhouse' chmod a+x ./clickhouse ## install clickhouse on MAC OS ./clickhouse |
How to install clickhouse on Ubuntu and Debian OS?
1 2 3 4 5 6 7 8 9 |
## using apt sudo apt-get install 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-get install -y clickhouse-server clickhouse-client |
How to install clickhouse on RHEL, CentOS, and Fedora OS?
1 2 3 4 |
## using yum sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo sudo yum install -y clickhouse-server clickhouse-client |
How to install clickhouse using a script (any other Linux OS)?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
LATEST_VERSION=$(curl -s https://packages.clickhouse.com/tgz/stable/ | \ grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -V -r | head -n 1) export LATEST_VERSION curl -O "https://packages.clickhouse.com/tgz/stable/clickhouse-common-static-$LATEST_VERSION.tgz" curl -O "https://packages.clickhouse.com/tgz/stable/clickhouse-common-static-dbg-$LATEST_VERSION.tgz" curl -O "https://packages.clickhouse.com/tgz/stable/clickhouse-server-$LATEST_VERSION.tgz" curl -O "https://packages.clickhouse.com/tgz/stable/clickhouse-client-$LATEST_VERSION.tgz" tar -xzvf "clickhouse-common-static-$LATEST_VERSION.tgz" sudo "clickhouse-common-static-$LATEST_VERSION/install/doinst.sh" tar -xzvf "clickhouse-common-static-dbg-$LATEST_VERSION.tgz" sudo "clickhouse-common-static-dbg-$LATEST_VERSION/install/doinst.sh" tar -xzvf "clickhouse-server-$LATEST_VERSION.tgz" sudo "clickhouse-server-$LATEST_VERSION/install/doinst.sh" sudo /etc/init.d/clickhouse-server start tar -xzvf "clickhouse-client-$LATEST_VERSION.tgz" sudo "clickhouse-client-$LATEST_VERSION/install/doinst.sh" |
Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
## To start the server as a daemon, run: sudo clickhouse start ## There are also another ways to run ClickHouse: sudo service clickhouse-server start ## If you do not have service command, run as sudo /etc/init.d/clickhouse-server start ## If you have systemctl command, run as sudo systemctl start clickhouse-server.service ## try to connect to clickhouse database clickhouse-client |
To get more details on Clickhouse database, please refer https://github.com/ClickHouse/ClickHouse