2017-01-16 20:00:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# How to build ClickHouse under debian-based systems (ubuntu)
|
|
|
|
|
|
|
|
# apt install -y curl sudo
|
|
|
|
# curl https://raw.githubusercontent.com/yandex/ClickHouse/master/doc/build_debian.sh | sh
|
|
|
|
|
|
|
|
# install compiler and libs
|
2017-01-21 02:35:10 +00:00
|
|
|
sudo apt install -y git bash cmake gcc-6 g++-6 libicu-dev libreadline-dev libmysqlclient-dev unixodbc-dev libltdl-dev libssl-dev
|
2017-02-28 23:49:04 +00:00
|
|
|
# for -DUNBUNDLED=1 mode:
|
|
|
|
#sudo apt install -y libboost-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzstd-dev libre2-dev libzookeeper-mt-dev libsparsehash-dev # libpoco-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
|
|
|
|
git clone https://github.com/yandex/ClickHouse.git
|
|
|
|
|
|
|
|
# Build!
|
|
|
|
mkdir -p ClickHouse/build
|
|
|
|
cd ClickHouse/build
|
|
|
|
cmake .. -DCMAKE_CXX_COMPILER=`which g++-6` -DCMAKE_C_COMPILER=`which gcc-6`
|
|
|
|
|
|
|
|
make -j $(nproc || sysctl -n hw.ncpu || echo 2)
|
|
|
|
cd ..
|