2017-01-16 20:00:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# How to build ClickHouse under debian-based systems (ubuntu)
|
|
|
|
|
|
|
|
# apt install -y curl sudo
|
2017-08-31 17:11:30 +00:00
|
|
|
# curl https://raw.githubusercontent.com/yandex/ClickHouse/master/utils/build/build_debian.sh | sh
|
2017-01-16 20:00:17 +00:00
|
|
|
|
|
|
|
# install compiler and libs
|
2019-09-17 10:37:35 +00:00
|
|
|
sudo apt install -y git bash cmake ninja-build gcc-8 g++-8 libicu-dev libreadline-dev gperf
|
2017-02-28 23:49:04 +00:00
|
|
|
# for -DUNBUNDLED=1 mode:
|
2020-06-11 08:49:47 +00:00
|
|
|
#sudo apt install -y libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-regex-dev libboost-iostreams-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzstd-dev libre2-dev librdkafka-dev libcapnp-dev libpoco-dev libgoogle-perftools-dev libunwind-dev googletest libcctz-dev
|
2017-01-16 20:00:17 +00:00
|
|
|
|
|
|
|
# install testing only stuff if you want:
|
2020-10-02 16:54:07 +00:00
|
|
|
sudo apt install -y expect python3 python3-lxml python3-termcolor python3-requests curl perl sudo openssl netcat-openbsd telnet
|
2017-01-16 20:00:17 +00:00
|
|
|
|
2018-08-27 14:39:20 +00:00
|
|
|
BASE_DIR=$(dirname $0) && [ -f "$BASE_DIR/../../CMakeLists.txt" ] && ROOT_DIR=$BASE_DIR/../.. && cd $ROOT_DIR
|
2017-01-16 20:00:17 +00:00
|
|
|
|
2018-08-27 14:39:20 +00:00
|
|
|
if [ -z $ROOT_DIR ]; then
|
|
|
|
# Checkout ClickHouse sources
|
|
|
|
git clone --recursive https://github.com/yandex/ClickHouse.git
|
|
|
|
cd ClickHouse
|
|
|
|
fi
|
2017-01-16 20:00:17 +00:00
|
|
|
|
2018-08-27 14:39:20 +00:00
|
|
|
# Build!
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2019-09-14 09:11:52 +00:00
|
|
|
cmake .. -DCMAKE_CXX_COMPILER=`which g++-9 g++-8 | head -n1` -DCMAKE_C_COMPILER=`which gcc-9 gcc-8 | head -n1`
|
2018-08-27 14:39:20 +00:00
|
|
|
cmake --build .
|
2017-01-16 20:00:17 +00:00
|
|
|
cd ..
|
2018-08-27 14:39:20 +00:00
|
|
|
|
|
|
|
# Run server:
|
2020-04-01 23:51:21 +00:00
|
|
|
# build/programs/clickhouse-server --config-file=ClickHouse/programs/server/config.xml &
|
2018-08-27 14:39:20 +00:00
|
|
|
|
|
|
|
# Run client:
|
2020-04-01 23:51:21 +00:00
|
|
|
# build/programs/clickhouse-client
|