Find file
2bd5bcc Dec 14, 2016
@excitoon @hatarist
82 lines (55 sloc) 1.51 KB

How to build ClickHouse

Build should work on Mac OS X 10.12. If you're using earlier version, you can try to build ClickHouse using Gentoo Prefix and clang sl in this instruction. With appropriate changes, build should work on any other OS X distribution.

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL"

Install cmake, gcc

brew install cmake gcc

Install GCC-compatible version of boost

brew install boost --cc=gcc-6

Install required libraries

brew install icu4c mysql openssl unixodbc glib libtool gettext homebrew/dupes/libiconv homebrew/dupes/zlib

Install optional libraries

brew install readline

Checkout ClickHouse sources

To get the latest stable version:

git clone -b stable
# or: git clone -b stable

cd ClickHouse

For development, switch to the master branch. For the latest release candidate, switch to the testing branch.

Use GCC 6 for builds

export CC=gcc-6
export CXX=g++-6

Disable MongoDB binding


Detect number of threads

export THREADS=$(sysctl -n hw.ncpu)

Build ClickHouse

mkdir build
cd build
cmake ..
make -j $THREADS
cd ..


If you intend to run clickhouse-server, make sure to increase system's maxfiles variable. See for more details.