Clickhouse源码编译环境配置

Clickhouse源码编译环境配置

clang 配置

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

cd /etc/yum.repos.d
4 ll
5 rm -rf CentOS-Linux-*
6 ll
7 yum clean all
8 yum makecache
9 yum install clang
10 reboot

ios:
-DCMAKE_C_COMPILER= ( b r e w − − p r e f i x l l v m ) / b i n / c l a n g − D C M A K E C X X C O M P I L E R = (brew --prefix llvm)/bin/clang -DCMAKE_CXX_COMPILER= (brewprefixllvm)/bin/clangDCMAKECXXCOMPILER=(brew --prefix llvm)/bin/clang++
linux:
在编辑工具中(clion)
File-settings-CMake中 配置上: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++

编译通过后
Clion 的编译参数配置中增加 server 参数;执行programs main.cpp main方法时,自动执行 ./clickhouse server 命令

查看Clickhouse 命令,直接使用 ./clickhouse 命令查看

启动服务端 命令:
./clickhouse server
启动客户端命令
./clickhouse client

centos7 致命错误解决:curl/curl.h:没有那个文件或目录 #include “curl/curl.h”
yum -y install curl-devel

sudo yum install cmake
git clone https://github.com/open-source-parsers/jsoncpp.git
cd jsoncpp
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G “Unix Makefiles” …/…/
make
sudo make install
ldconfig

遇到错误:
fatal: 无法访问 https://github.com/ :Failed to connect to github.com port 443: 拒绝连接的解决办法

解决办法:在终端输入 sudo gedit /etc/hosts ,打开/etc/hosts文件,然后注释掉所有只涉及到github.com的行(注意是 只有github.com ,有任何别的都不可以)即可解决。

删除内容:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

解决不存在 json.h 问题
sudo yum install jsoncpp-devel
解决 未找到匹配的参数: jsoncpp-devel问题
yum install epel-release

Centos8下ssh -T git@github.com提示Broken pipe错误

vim /etc/ssh/ssh_config

Host *
IPQoS=throughput
systemctl restart sshd

操作替换clickhouse文件
ssh root@10.216.26.51

密码 ziroom

cd /usr/bin

mv clickhouse clickhouse_back

exit cd /home/clickhouse/Clickhouse/cmake-build-release/program

ls | grep clickhouse

scp clickhouse root@10.216.26.51:/usr/bin

ClickHouse自定义函数研发总结
(1)配置文件中可配置用户名密码:优先采用 config.xml中的配置;其次采用user.xml中的配置;
(2)C++中的容器用法是关键

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值