cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
doc/build_freebsd.sh
35lines · modecode
9 years ago
| 1 | #!/bin/sh |
| 2 | |
| 3 | # How to build ClickHouse under freebsd 11+ |
| 4 | # [temporary solution before port created] |
| 5 | |
| 6 | # pkg install -y curl sudo |
| 7 | # curl https://raw.githubusercontent.com/yandex/ClickHouse/master/doc/build_freebsd.sh | sh |
| 8 | |
| 9 | # install compiler and libs |
| 10 | sudo pkg install git cmake bash mysql57-client icu libltdl unixODBC google-perftools |
| 11 | |
| 12 | # install testing only stuff if you want: |
| 13 | sudo pkg install python py27-lxml py27-termcolor curl perl5 |
| 14 | |
| 15 | # Checkout ClickHouse sources |
| 16 | git clone https://github.com/yandex/ClickHouse.git |
| 17 | |
| 18 | # Build! |
| 19 | mkdir -p ClickHouse/build |
| 20 | cd ClickHouse/build |
| 21 | cmake .. -DUSE_INTERNAL_GPERFTOOLS_LIBRARY=0 |
| 22 | # WIP: variant with libs from ports: |
| 23 | # sudo pkg install devel/boost-libs devel/libzookeeper devel/libdouble-conversion archivers/zstd archivers/liblz4 devel/sparsehash devel/re2 |
| 24 | # Check UNIXODBC option: |
| 25 | # make -C /usr/ports/devel/poco config reinstall |
| 26 | # cmake .. -DUNBUNDLED=1 -DUSE_STATIC_LIBRARIES=0 -DNO_WERROR=1 |
| 27 | |
| 28 | make -C dbms/src/Server -j $(nproc || sysctl -n hw.ncpu || echo 2) |
| 29 | cd ../.. |
| 30 | |
| 31 | # run server: |
| 32 | # ClickHouse/build/dbms/src/Server/clickhouse --server --config-file=ClickHouse/dbms/src/Server/config.xml & |
| 33 | |
| 34 | # run client: |
| 35 | # ClickHouse/build/dbms/src/Server/clickhouse --client |