2016-12-24 01:03:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# How to build ClickHouse under freebsd 11+
|
|
|
|
# [temporary solution before port created]
|
|
|
|
|
2017-01-16 20:00:17 +00:00
|
|
|
# pkg install -y curl sudo
|
|
|
|
# curl https://raw.githubusercontent.com/yandex/ClickHouse/master/doc/build_freebsd.sh | sh
|
|
|
|
|
2016-12-24 01:03:10 +00:00
|
|
|
# install compiler and libs
|
2017-01-21 02:35:10 +00:00
|
|
|
sudo pkg install git cmake bash mysql57-client icu libltdl unixODBC google-perftools
|
2016-12-24 01:03:10 +00:00
|
|
|
|
|
|
|
# install testing only stuff if you want:
|
2017-01-19 18:53:29 +00:00
|
|
|
sudo pkg install python py27-lxml py27-termcolor curl perl5
|
2016-12-24 01:03:10 +00:00
|
|
|
|
|
|
|
# Checkout ClickHouse sources
|
|
|
|
git clone https://github.com/yandex/ClickHouse.git
|
|
|
|
|
|
|
|
# Build!
|
|
|
|
mkdir -p ClickHouse/build
|
|
|
|
cd ClickHouse/build
|
2017-01-19 18:53:29 +00:00
|
|
|
cmake .. -DUSE_INTERNAL_GPERFTOOLS_LIBRARY=0
|
|
|
|
# WIP: variant with libs from ports:
|
|
|
|
# sudo pkg install boost-libs
|
|
|
|
# Check UNIXODBC option:
|
|
|
|
# make -C /usr/ports/devel/poco config reinstall
|
|
|
|
# cmake .. -DUSE_INTERNAL_BOOST_LIBRARY=0 -DUSE_INTERNAL_POCO_LIBRARY=0 -DUSE_INTERNAL_GPERFTOOLS_LIBRARY=0
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2017-01-19 18:53:29 +00:00
|
|
|
make -C dbms/src/Server -j $(nproc || sysctl -n hw.ncpu || echo 2)
|
|
|
|
cd ../..
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2017-01-19 18:53:29 +00:00
|
|
|
# run server:
|
|
|
|
# ClickHouse/build/dbms/src/Server/clickhouse --server --config-file=ClickHouse/dbms/src/Server/config.xml &
|
|
|
|
|
|
|
|
# run client:
|
|
|
|
# ClickHouse/build/dbms/src/Server/clickhouse --client
|