2016-12-24 01:03:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# How to build ClickHouse under freebsd 11+
|
|
|
|
|
|
|
|
# Variant 1: Use pkg:
|
|
|
|
# pkg install databases/clickhouse
|
|
|
|
|
|
|
|
# Variant 2: Use ports:
|
|
|
|
# make -C /usr/ports/databases/clickhouse install clean
|
|
|
|
|
|
|
|
# Run server:
|
|
|
|
# echo clickhouse_enable="YES" >> /etc/rc.conf.local
|
|
|
|
# service clickhouse restart
|
|
|
|
|
|
|
|
|
|
|
|
# Variant 3: Manual build:
|
2016-12-24 01:03:10 +00:00
|
|
|
|
2017-01-16 20:00:17 +00:00
|
|
|
# pkg install -y curl sudo
|
2017-08-31 17:11:30 +00:00
|
|
|
# curl https://raw.githubusercontent.com/yandex/ClickHouse/master/utils/build/build_freebsd.sh | sh
|
2017-01-16 20:00:17 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# install compiler and libs
|
2018-05-07 15:59:52 +00:00
|
|
|
sudo pkg install devel/git devel/cmake shells/bash devel/icu devel/libltdl databases/unixODBC devel/google-perftools devel/libdouble-conversion archivers/zstd archivers/liblz4 devel/sparsehash devel/re2
|
2017-05-05 00:23:32 +00:00
|
|
|
|
|
|
|
# install testing only stuff if you want:
|
|
|
|
sudo pkg install lang/python devel/py-lxml devel/py-termcolor ftp/curl perl5
|
2016-12-24 01:03:10 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# If you want ODBC support: Check UNIXODBC option:
|
|
|
|
# make -C /usr/ports/devel/poco config reinstall
|
2016-12-24 01:03:10 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# Checkout ClickHouse sources
|
2017-08-31 17:11:30 +00:00
|
|
|
git clone --recursive https://github.com/yandex/ClickHouse.git
|
2016-12-24 01:03:10 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# Build!
|
2016-12-24 01:03:10 +00:00
|
|
|
mkdir -p ClickHouse/build
|
|
|
|
cd ClickHouse/build
|
2017-08-31 17:11:30 +00:00
|
|
|
cmake .. -DUNBUNDLED=1 -DUSE_STATIC_LIBRARIES=0
|
2017-05-05 00:23:32 +00:00
|
|
|
# build with boost 1.64 from ports temporary broken
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2018-05-05 12:31:47 +00:00
|
|
|
make clickhouse-bundle -j $(nproc || sysctl -n hw.ncpu || echo 2)
|
2017-01-19 18:53:29 +00:00
|
|
|
cd ../..
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# Run server:
|
2018-05-05 12:31:47 +00:00
|
|
|
# ClickHouse/build/dbms/src/Server/clickhouse-server --config-file=ClickHouse/dbms/src/Server/config.xml &
|
2017-01-19 18:53:29 +00:00
|
|
|
|
2017-05-05 00:23:32 +00:00
|
|
|
# Run client:
|
2018-05-05 12:31:47 +00:00
|
|
|
# ClickHouse/build/dbms/src/Server/clickhouse-client
|