mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-04 15:40:49 +00:00
67c2e50331
* update presentations * CLICKHOUSE-2936: redirect from clickhouse.yandex.ru and clickhouse.yandex.com * update submodule * lost files * CLICKHOUSE-2981: prefer sphinx docs over original reference * CLICKHOUSE-2981: docs styles more similar to main website + add flags to switch language links * update presentations * Less confusing directory structure (docs -> doc/reference/) * Minify sphinx docs too * Website release script: fail fast + pass docker hash on deploy * Do not underline links in docs * shorter * cleanup docker images * tune nginx config * CLICKHOUSE-3043: get rid of habrastorage links * Lost translation * CLICKHOUSE-2936: temporary client-side redirect * behaves weird in test * put redirect back * CLICKHOUSE-3047: copy docs txts to public too * move to proper file * remove old pages to avoid confusion * Remove reference redirect warning for now * Refresh README.md * Yellow buttons in docs * Use svg flags instead of unicode ones in docs * fix test website instance * Put flags to separate files * wrong flag * Copy Yandex.Metrica introduction from main page to docs * Yet another home page structure change, couple new blocks (CLICKHOUSE-3045) * Update Contacts section * CLICKHOUSE-2849: more detailed legal information * CLICKHOUSE-2978 preparation - split by files * More changes in Contacts block * Tune texts on index page * update presentations * One more benchmark * Add usage sections to index page, adapted from slides * Get the roadmap started, based on slides from last ClickHouse Meetup * CLICKHOUSE-2977: some rendering tuning * Get rid of excessive section in the end of getting started * Make headers linkable * CLICKHOUSE-2981: links to editing reference - https://github.com/yandex/ClickHouse/issues/849 * CLICKHOUSE-2981: fix mobile styles in docs * Ban crawling of duplicating docs * Open some external links in new tab * Ban old docs too * Lots of trivial fixes in english docs * Lots of trivial fixes in russian docs * Remove getting started copies in markdown * Add Yandex.Webmaster * Fix some sphinx warnings * More warnings fixed in english docs * More sphinx warnings fixed * Add code-block:: text * More code-block:: text * These headers look not that well * Better switch between documentation languages * merge use_case.rst into ya_metrika_task.rst * Edit the agg_functions.rst texts * Add lost empty lines * Lost blank lines * Add new logo sizes * update presentations * Next step in migrating to new documentation * Fix all warnings in en reference * Fix all warnings in ru reference * Re-arrange existing reference * Move operation tips to main reference * Fix typos noticed by milovidov@ * Get rid of zookeeper.md * Looks like duplicate of tutorial.html * Fix some mess with html tags in tutorial * No idea why nobody noticed this before, but it was completely not clear whet to get the data * Match code block styling between main and tutorial pages (in favor of the latter) * Get rid of some copypaste in tutorial * Normalize header styles * Move example_datasets to sphinx * Move presentations submodule to website * Move and update README.md * No point in duplicating articles from habrahabr here * Move development-related docs as is for now * doc/reference/ -> docs/ (to match the URL on website) * Adapt links to match the previous commit * Adapt development docs to rst (still lacks translation and strikethrough support) * clean on release * blacklist presentations in gulp * strikethrough support in sphinx * just copy development folder for now * fix weird introduction in style article * Style guide translation (WIP) * Finish style guide translation to English * gulp clean separately * Update year in LICENSE * Initial CONTRIBUTING.md * Fix remaining links to old docs in tutorial * Some tutorial fixes * Typo * Another typo * Update list of authors from yandex-team accoding to git log
145 lines
4.1 KiB
ReStructuredText
145 lines
4.1 KiB
ReStructuredText
Getting started
|
|
===============
|
|
|
|
System requirements
|
|
-------------------
|
|
|
|
This is not a cross-platform system. It requires Linux Ubuntu Precise (12.04) or newer, x86_64 architecture with SSE 4.2 instruction set.
|
|
To test for SSE 4.2 support, do:
|
|
|
|
.. code-block:: text
|
|
|
|
grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"
|
|
|
|
We recommend using Ubuntu Trusty or 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
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
In `/etc/apt/sources.list` (or in a separate `/etc/apt/sources.list.d/clickhouse.list` file), add the repository:
|
|
|
|
.. code-block:: text
|
|
|
|
deb http://repo.yandex.ru/clickhouse/trusty stable main
|
|
|
|
For other Ubuntu versions, replace `trusty` to `xenial` or `precise`.
|
|
|
|
Then run:
|
|
|
|
.. code-block:: bash
|
|
|
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 # optional
|
|
sudo apt-get update
|
|
sudo apt-get install clickhouse-client clickhouse-server-common
|
|
|
|
You can also download and install packages manually from here:
|
|
http://repo.yandex.ru/clickhouse/trusty/pool/main/c/clickhouse/,
|
|
http://repo.yandex.ru/clickhouse/xenial/pool/main/c/clickhouse/,
|
|
http://repo.yandex.ru/clickhouse/precise/pool/main/c/clickhouse/.
|
|
|
|
ClickHouse contains access restriction settings. They are located in the 'users.xml' file (next to 'config.xml').
|
|
By default, access is allowed from everywhere for the default user without a password. See 'user/default/networks'. For more information, see the section "Configuration files".
|
|
|
|
Installing from source
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
To build, follow the instructions in build.md (for Linux) or in build_osx.md (for Mac OS X).
|
|
|
|
You can compile packages and install them. You can also use programs without installing packages.
|
|
|
|
.. code-block:: text
|
|
|
|
Client: dbms/src/Client/
|
|
Server: dbms/src/Server/
|
|
|
|
For the server, create a catalog with data, such as:
|
|
|
|
.. code-block:: text
|
|
|
|
/opt/clickhouse/data/default/
|
|
/opt/clickhouse/metadata/default/
|
|
|
|
(Configured in the server config.)
|
|
Run 'chown' for the desired user.
|
|
|
|
Note the path to logs in the server config (src/dbms/src/Server/config.xml).
|
|
|
|
Other methods of installation
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
The Docker image is located here: https://hub.docker.com/r/yandex/clickhouse-server/
|
|
|
|
There is Gentoo overlay located here: https://github.com/kmeaw/clickhouse-overlay
|
|
|
|
|
|
Launch
|
|
------
|
|
|
|
To start the server (as a daemon), run:
|
|
|
|
.. code-block:: bash
|
|
|
|
sudo service clickhouse-server start
|
|
|
|
View the logs in the catalog `/var/log/clickhouse-server/`
|
|
|
|
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:
|
|
|
|
.. code-block:: bash
|
|
|
|
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:
|
|
|
|
.. code-block:: bash
|
|
|
|
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. For example:
|
|
|
|
.. code-block:: bash
|
|
|
|
clickhouse-client --host=example.com
|
|
|
|
For more information, see the section "Command-line client".
|
|
|
|
Checking the system:
|
|
|
|
.. code-block:: bash
|
|
|
|
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, it works!**
|
|
|
|
For further experiments you can try playing with one of the following example datasets:
|
|
|
|
.. toctree::
|
|
:glob:
|
|
|
|
example_datasets/*
|
|
|