ClickHouse/docs/en/getting_started/index.md
Ivan Blinkov 94f86eda79
WIP on docs: improvements for search + some content changes (#2842)
* Some improvements for introduction/performance.md

* Minor improvements for example_datasets

* Add website/package-lock.json to .gitignore

* YT paragraph was badly outdated and there is no real reason to write a new one

* Use weird introduction article as a starting point for F.A.Q.

* Some refactoring of first half of ya_metrika_task.md

* minor

* Weird docs footer bugfix

* Forgotten redirect

* h/v scrollbars same size in docs

* CLICKHOUSE-3831: introduce security changelog

* A bit more narrow tables on docs front page

* fix flag in ru docs

* Save some space in top level of docs ToC

* Capitalize most words in titles of docs/en/

* more docs scrollbar fixes

* fix incorrect merge

* fix link

* fix switching languages in single page docs mode

* Update mkdocs & mkdocs-material + unminify javascript

* cherrypick 17e18d1ecc
2018-08-10 17:44:49 +03:00

3.6 KiB

Getting Started

System Requirements

This is not a cross-platform system. It requires Linux Ubuntu Precise (12.04) or newer, with x86_64 architecture and support for the SSE 4.2 instruction set. To check for SSE 4.2:

grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"

We recommend using Ubuntu Trusty, Ubuntu Xenial, or Ubuntu Precise. The terminal must use UTF-8 encoding (the default in Ubuntu).

Installation

For testing and development, the system can be installed on a single server or on a desktop computer.

Installing from Packages for Debian/Ubuntu

In /etc/apt/sources.list (or in a separate /etc/apt/sources.list.d/clickhouse.list file), add the repository:

deb http://repo.yandex.ru/clickhouse/deb/stable/ main/

If you want to use the most recent test version, replace 'stable' with 'testing'.

Then run:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4    # optional
sudo apt-get update
sudo apt-get install clickhouse-client clickhouse-server

You can also download and install packages manually from here: https://repo.yandex.ru/clickhouse/deb/stable/main/.

ClickHouse contains access restriction settings. They are located in the 'users.xml' file (next to 'config.xml'). By default, access is allowed from anywhere for the 'default' user, without a password. See 'user/default/networks'. For more information, see the section "Configuration files".

Installing from Sources

To compile, follow the instructions: build.md

You can compile packages and install them. You can also use programs without installing packages.

Client: dbms/programs/clickhouse-client
Server: dbms/programs/clickhouse-server

For the server, create a catalog with data, such as:

/opt/clickhouse/data/default/
/opt/clickhouse/metadata/default/

(Configurable in the server config.) Run 'chown' for the desired user.

Note the path to logs in the server config (src/dbms/programs/config.xml).

Other Installation Methods

Docker image: https://hub.docker.com/r/yandex/clickhouse-server/

RPM packages for CentOS or RHEL: https://github.com/Altinity/clickhouse-rpm-install

Gentoo: emerge clickhouse

Launch

To start the server (as a daemon), run:

sudo service clickhouse-server start

See the logs in the /var/log/clickhouse-server/ directory.

If the server doesn't start, check the configurations in the file /etc/clickhouse-server/config.xml.

You can also launch the server 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 convenient during development. If the configuration file is in the current directory, you don't need to specify the '--config-file' parameter. By default, it uses './config.xml'.

You can use the command-line client to connect to the server:

clickhouse-client

The default parameters indicate connecting with localhost:9000 on behalf of the user 'default' without a password. The client can be used for connecting to a remote server. Example:

clickhouse-client --host=example.com

For more information, see the section "Command-line client".

Checking the system:

milovidov@hostname:~/work/metrica/src/dbms/src/Client$ ./clickhouse-client
ClickHouse client version 0.0.18749.
Connecting to localhost:9000.
Connected to ClickHouse server version 0.0.18749.

:) SELECT 1

SELECT 1

┌─1─┐
│ 1 │
└───┘

1 rows in set. Elapsed: 0.003 sec.

:)

Congratulations, the system works!

To continue experimenting, you can try to download from the test data sets.