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
|
2017-11-17 13:14:13 +00:00
|
|
|
sudo apt install -y git bash cmake gcc-7 g++-7 libicu-dev libreadline-dev libmysqlclient-dev unixodbc-dev libltdl-dev libssl-dev
|
2017-02-28 23:49:04 +00:00
|
|
|
# for -DUNBUNDLED=1 mode:
|
2018-01-20 02:35:16 +00:00
|
|
|
#sudo apt install -y libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzstd-dev libre2-dev libzookeeper-mt-dev libsparsehash-dev librdkafka-dev libcapnp-dev libpoco-dev libsparsehash-dev libgoogle-perftools-dev libunwind-dev googletest libcctz-dev
|
2017-01-16 20:00:17 +00:00
|
|
|
|
|
|
|
# install testing only stuff if you want:
|
|
|
|
sudo apt install -y python python-lxml python-termcolor curl perl
|
|
|
|
|
|
|
|
# Checkout ClickHouse sources
|
2017-08-31 17:11:30 +00:00
|
|
|
git clone --recursive https://github.com/yandex/ClickHouse.git
|
2017-01-16 20:00:17 +00:00
|
|
|
|
|
|
|
# Build!
|
|
|
|
mkdir -p ClickHouse/build
|
|
|
|
cd ClickHouse/build
|
2017-11-17 13:14:13 +00:00
|
|
|
cmake .. -DCMAKE_CXX_COMPILER=`which g++-7` -DCMAKE_C_COMPILER=`which gcc-7`
|
2017-01-16 20:00:17 +00:00
|
|
|
|
|
|
|
make -j $(nproc || sysctl -n hw.ncpu || echo 2)
|
|
|
|
cd ..
|