鲲鹏920 安装clickhouse,

1、建议参考官网链接:

https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/ClickHouse/openmind_clickhouse2012_03_0008.html

 

后台运行(推荐)。
nohup /opt/clickhouse/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml &

后台启动服务后,输入回车跳过当前回显日志。

 查看服务端启动。

ps -ef |grep clickhouse-server

客户端连接数据库。(如果服务端是以前台方式启动的,需要重新开启窗口进行客户端连接。)

/opt/clickhouse/bin/clickhouse-client -m

 

2、源码编译记录如下

yum -y install lz4-devel 
openssl-devel 
zlib-devel 
zstd-devel 
yum --nogpgcheck -y install protobuf-devel 
yum --nogpgcheck -y install libicu-devel 
yum --nogpgcheck -y  install readline-devel 
yum --nogpgcheck -y  install gperf 
yum --nogpgcheck -y install curl-devel



Package libcurl-7.69.1-1.ky10.aarch64.rpm is not signed  包libcurl-7.69.1-1.ky10.aarch64.rpm未签名

yum -y install  bzip2

baseurl =http://10.80.15.205:9337/cs2c/NS/V10/V10SP3/os/adv/lic/base/$basearch/
ftp://gcc.gnu.org/pub/gcc/infrastructure/


gmp='gmp-6.1.0.tar.bz2'
mpfr='mpfr-3.1.4.tar.bz2'
mpc='mpc-1.0.3.tar.gz'
isl='isl-0.18.tar.bz2'



安装gmp

tar xf gmp-6.1.0.tar.bz2
cd gmp-6.1.0
./configure
make -j 64 && make install

报错:
configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
安装包:
yum --nogpgcheck -y install m4

安装isl
cd ..
tar xf isl-0.18.tar.bz2
cd isl-0.18
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
echo "export LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH" >> /etc/profile
./configure
make -j 64 && make install


安装mpfr

cd ..
tar xf mpfr-3.1.4.tar.bz2
cd mpfr-3.1.4
./configure
make -j 64 && make install

安装 mpc
cd ..
tar xf mpc-1.0.3.tar.gz
cd mpc-1.0.3
./configure
make -j 64 && make install

安装  gcc


./configure --prefix=/usr/local/gcc-9.3.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib

# 编译生成 makefile 文件,开 4 个进程进行编译
make -j 4

# 安装 GCC
sudo make install

./configure && make && make install


# 设置环境变量
vim /etc/profile
# 添加以下配置
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
export CC=/usr/local/gcc-9.3.0/bin/aarch64-unknown-linux-gnu-gcc
export CXX=/usr/local/gcc-9.3.0/bin/aarch64-unknown-linux-gnu-g++
export PATH=/usr/local/gcc-9.3.0/bin:${PATH}

# 设置头文件
sudo ln -sv /usr/local/gcc-9.3.0/include/ /usr/include/gcc

# 设置库文件
touch /etc/ld.so.conf.d/gcc.conf
sudo chmod 777 /etc/ld.so.conf.d/gcc.conf 
sudo echo -e "/usr/local/gcc-9.3.0/lib64" >> /etc/ld.so.conf.d/gcc.conf





# 加载动态连接库
sudo ldconfig -v
ldconfig -p | grep gcc

# 测试
gcc --version



报错 缺少c++库:

configure: error: C++ preprocessor "/lib/cpp" fails sanity check


yum --nogpgcheck -y install glibc-headers
yum --nogpgcheck -y install gcc-c++




cp /usr/local/gcc-9.3.0/lib64/libstdc++.so.6.0.28 /usr/lib64
cd /usr/lib64
ln -s -f libstdc++.so.6 libstdc++.so.6.0.28

# 检查是否包含 GLIBCXX_3.4.* 版本
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28


安装 CMake
yum --nogpgcheck -y install cmake-3.16
yum --nogpgcheck -y install clang

 

posted @ 2024-11-05 16:31  leolzi  阅读(23)  评论(0编辑  收藏  举报