Skip to content

Commit

Permalink
Merge pull request #8612 from ClickHouse/docs_for_tgz
Browse files Browse the repository at this point in the history
Slightly improve script and add docs
  • Loading branch information
alesapin authored Jan 10, 2020
2 parents 5e29fe3 + ca1d934 commit f06c687
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 5 deletions.
29 changes: 29 additions & 0 deletions docs/en/getting_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,35 @@ sudo yum install clickhouse-server clickhouse-client

You can also download and install packages manually from here: <https://repo.yandex.ru/clickhouse/rpm/stable/x86_64>.

### From tgz archives {#from-tgz-archives}

It is recommended to use official pre-compiled `tgz` archives for all Linux distributions, where installation of `deb` or `rpm` packages is not possible.

Required version can be dowloaded with `curl` or `wget` from repository <https://repo.yandex.ru/clickhouse/tgz/>.
After that downloaded archives should be unpacked and installed with installation scripts. Example for the latest version:
```bash
export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1`
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-server-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/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
```

For production environments it's recommended to use latest `stable`-version. You can find it's number on github page https://github.com/ClickHouse/ClickHouse/tags with postfix `-stable`.

### From Docker Image

To run ClickHouse inside Docker follow the guide on [Docker Hub](https://hub.docker.com/r/yandex/clickhouse-server/). Those images use official `deb` packages inside.
Expand Down
30 changes: 29 additions & 1 deletion docs/ru/getting_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ sudo yum-config-manager --add-repo https://repo.yandex.ru/clickhouse/rpm/stable/

Для использования наиболее свежих версий нужно заменить `stable` на `testing` (рекомендуется для тестовых окружений).

Then run these commands to actually install packages:
Для, собственно, установки пакетов необходимо выполнить следующие команды:

```bash
Expand All @@ -59,6 +58,35 @@ sudo yum install clickhouse-server clickhouse-client

Также есть возможность установить пакеты вручную, скачав отсюда: <https://repo.yandex.ru/clickhouse/rpm/stable/x86_64>.

### Из tgz архивов {#from-tgz-archives}

Команда ClickHouse в Яндексе рекомендует использовать предкомпилированные бинарники из `tgz` архивов для всех дистрибутивов, где невозможна установка `deb` и `rpm` пакетов.

Интересующую версию архивов можно скачать вручную с помощью `curl` или `wget` из репозитория <https://repo.yandex.ru/clickhouse/tgz/>.
После этого архивы нужно распаковать и воспользоваться скриптами установки. Пример установки самой свежей версии:
```bash
export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1`
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-server-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/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
```

Для production окружений рекомендуется использовать последнюю `stable`-версию. Её номер также можно найти на github с на вкладке https://github.com/ClickHouse/ClickHouse/tags c постфиксом `-stable`.

### Из Docker образа {#from-docker-image}

Для запуска ClickHouse в Docker нужно следовать инструкции на [Docker Hub](https://hub.docker.com/r/yandex/clickhouse-server/). Внутри образов используются официальные `deb` пакеты.
Expand Down
4 changes: 2 additions & 2 deletions utils/release/release_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ function make_tgz {
fi

SCRIPT_TEXT='
SCRIPTPATH=$(dirname "$SCRIPT")
for filepath in `find $SCRIPTPATH/.. -type f -or -type l | grep -v "/install/"`; do
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
for filepath in `find $SCRIPTPATH/.. -type f -or -type l | grep -v "\.\./install/"`; do
destpath=${filepath##$SCRIPTPATH/..}
mkdir -p $(dirname "$destpath")
cp -r "$filepath" "$destpath"
Expand Down
26 changes: 24 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ <h2 id="quick-start">Quick Start</h2>

<p>System requirements: Linux, x86_64 with SSE 4.2.</p>

<p>Install packages for <span class="distributive_selected" id="repo_deb">Ubuntu/Debian</span> or <span class="distributive_not_selected" id="repo_rpm">CentOS/RedHat</span>:</p>
<p>Install packages for <span class="distributive_selected" id="repo_deb">Ubuntu/Debian</span> or <span class="distributive_not_selected" id="repo_rpm">CentOS/RedHat</span> or <span class="distributive_not_selected" id="repo_tgz">Other Linux</span>:</p>

<code id="packages-install">
<pre id="instruction_deb">
Expand All @@ -422,6 +422,28 @@ <h2 id="quick-start">Quick Start</h2>
sudo /etc/init.d/clickhouse-server start
clickhouse-client
</pre>

<pre id="instruction_tgz" style="display: none;">
export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1`
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/clickhouse-server-$LATEST_VERSION.tgz
curl -O https://repo.yandex.ru/clickhouse/tgz/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
</pre>

</code>

<p>For other operating systems the easiest way to get started is using
Expand Down Expand Up @@ -549,7 +571,7 @@ <h2>Like ClickHouse?</h2>
window.location.host = hostParts[0] + '.' + hostParts[1];
}

var available_distributives = ['deb', 'rpm'];
var available_distributives = ['deb', 'rpm', 'tgz'];
var selected_distributive = 'deb';

function refresh_distributives() {
Expand Down

0 comments on commit f06c687

Please sign in to comment.