kudu 1.7 源码安装

kudu 1.7  源码安装

一. 安装环境依赖

yum install autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi \

  cyrus-sasl-plain flex gcc gcc-c++ gdb \

  krb5-server krb5-workstation libtool make openssl-devel patch \

  pkgconfig redhat-lsb-core rsync unzip vim-common which

二.安装开发以下工

DTLS_RPM=rhscl-devtoolset-3-epel-6-x86_64-1-2.noarch.rpm

DTLS_RPM_URL=https://www.softwarecollections.org/repos/rhscl/devtoolset-3/epel-6-x86_64/noarch/${DTLS_RPM}wget ${DTLS_RPM_URL} -O ${DTLS_RPM}

yum install -y scl-utils ${DTLS_RPM}

yum install -y devtoolset-3-toolchain

三.安装额外的软件和文档构建工具

yum install doxygen gem graphviz ruby-devel zlib-devel

四.下载kudu源码

https://archive.apache.org/dist/kudu/1.7.1/apache-kudu-1.7.1.tar.gz

tar -zxf apache-kudu-1.7.1.tar.gz

cd apache-kudu-1.7.1

五.构建第三方平台需要的环境

build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh

这个步骤会下载相关的依赖包,会花费比较长的时间4小时左右(具体和网速有关)

六.构建kudu 

使用上述相关的工具进行构建,构建的时候需要新建一个临时目录来保存输出结果,注意:不能使用kudu源码目录

mkdir -p build/release

 

cd build/release

 

 

../../build-support/enable_devtoolset.sh \

  ../../thirdparty/installed/common/bin/cmake \

  -DCMAKE_BUILD_TYPE=release \

  ../..

 

如果出现问题:

 Version mismatch error.  This is libtool 2.4.6, but definition of this LT_INIT comes from libtool 2.2.6b.

(可能是你之前装的和现在装的冲突,本次就是anaconda的和yum安装的冲突)

yum remove -y autoconf

conda install -c anaconda autoconf

conda install -c anaconda automake  (这个也要安装)

 

继续执行(花了几十分钟)

../../build-support/enable_devtoolset.sh \

  ../../thirdparty/installed/common/bin/cmake \

  -DCMAKE_BUILD_TYPE=release \

  ../..

 

make -j4(将近一个小时)

七.构建文档(可选)

make docs

八. 编译后的将需要的文件整理到新建的文件夹

目录结构:

其中:bin是服务程序目录,conf是配置文件目录,www是web后台相关的js、图片、css文件目录。

kudu 1.7 源码安装_第1张图片

九.安装

Node2、node3的kudu配置(kudu程序根目录是:/opt/kudu)

修改vim conf/master.gflagfile


--master_addresses=node2,node3
--fs_data_dirs=/opt/data/kudu/data
--fs_metadata_dir=/opt/data/kudu/metedata
--fs_wal_dir=/opt/data/kudu/wal
--log_dir=/opt/data/kudu/logs
--webserver_doc_root=/opt/kudu/www

修改vim conf/tserver.gflagfile

--fs_data_dirs=/opt/data/kudu_tserver/data--fs_metadata_dir=/opt/data/kudu_tserver/metedata--fs_wal_dir=/opt/data/kudu_tserver/wal--log_dir=/opt/data/kudu_tserver/logs--tserver_master_addrs=node2:7051,node3:7051

创建master需要的目录:

mkdir -p /opt/data/kudu/data /opt/data/kudu/metedata /opt/data/kudu/metedata /opt/data/kudu/wal /opt/data/kudu/logs

创建tserver需要的目录:

mkdir -p /opt/data/kudu_tserver/data /opt/data/kudu_tserver/metedata /opt/data/kudu_tserver/metedata /opt/data/kudu_tserver/wal /opt/data/kudu_tserver/logs

 

分别开启node2、node3的服务

先开启master服务

./kudu-master --flagfile=../conf/master.gflagfile

报错:

./kudu-master: error while loading shared libraries: libsasl2.so.3: cannot open shared object file: No such file or directory

[root@node2 bin]# find / -name libsasl*

/usr/lib64/libsasl2.so.2.0.23

/usr/lib64/libsasl2.so

/usr/lib64/libsasl2.so.2

/usr/lib64/sasl2/libsasldb.so

/usr/lib64/sasl2/libsasldb.so.2.0.23

/usr/lib64/sasl2/libsasldb.so.2

确实没有,下载libsasl2.so.3放到/usr/lib64/目录

Chmod 777 libsasl2.so.3

再次开启

./kudu-master --flagfile=../conf/master.gflagfile

报错:

[root@node2 bin]# ./kudu-master --flagfile=../conf/master.gflagfile

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./kudu-master)

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.17' not found (required by ./kudu-master)

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/libsasl2.so.3)

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /usr/lib64/libsasl2.so.3)

[root@node2 bin]# strings /lib64/libc.so.6 |grep GLIBC_

GLIBC_2.2.5

GLIBC_2.2.6

GLIBC_2.3

GLIBC_2.3.2

GLIBC_2.3.3

GLIBC_2.3.4

GLIBC_2.4

GLIBC_2.5

GLIBC_2.6

GLIBC_2.7

GLIBC_2.8

GLIBC_2.9

GLIBC_2.10

GLIBC_2.11

GLIBC_2.12

GLIBC_PRIVATE

最新的才是2.12,没有2.14

下载glibc软件,并且升级

wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz

wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.14.tar.gz

tar -xvf  glibc-2.14.tar.gz

tar -xvf  glibc-ports-2.14.tar.gz

mv glibc-ports-2.14 glibc-2.14/ports

mkdir glibc-2.14/build

cd glibc-2.14/build

../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make

make install

 

运行再次报错:

[root@node2 bin]# ./kudu-master --flagfile=../conf/master.gflagfile

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ./kudu-master)

./kudu-master: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.17' not found (required by ./kudu-master)

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /usr/lib64/libsasl2.so.3)

 

 

可以看见没有GLIBCXX_3.4.13往上的

解决

##下载gcc最新版

wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.1/gcc-4.8.1.tar.gz

然后解压到文件夹

tar -xvzf gcc-4.8.1.tar.gz

进入解压缩之后的目录

cd gcc-4.8.1

然后执行下面的运行

./contrib/download_prerequisites

再返回上一层,建立build_gcc_4.8.1目录,这个目录和gcc-4.8.1平行

cd ..

mkdir build_gcc_4.8.1

进入刚建立的目录,并执行编译过程

cd build_gcc_4.8.1

../gcc-4.8.1/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib  

make -j23

make install

再次开启

[root@node2 bin]# ./kudu-master --flagfile=../conf/master.gflagfile

报错:

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./kudu-master)

./kudu-master: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /usr/lib64/libsasl2.so.3)

 

解决:

wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz

wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz

tar -xvf  glibc-2.15.tar.gz

tar -xvf  glibc-ports-2.15.tar.gz

mv glibc-ports-2.15 glibc-2.15/ports

mkdir glibc-2.15/build

cd glibc-2.15/build

../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make

make install

查看结果,ok

[root@node2 build]# strings /lib64/libc.so.6 |grep GLIBC_

GLIBC_2.2.5

GLIBC_2.2.6

GLIBC_2.3

GLIBC_2.3.2

GLIBC_2.3.3

GLIBC_2.3.4

GLIBC_2.4

GLIBC_2.5

GLIBC_2.6

GLIBC_2.7

GLIBC_2.8

GLIBC_2.9

GLIBC_2.10

GLIBC_2.11

GLIBC_2.12

GLIBC_2.13

GLIBC_2.14

GLIBC_2.15

GLIBC_PRIVATE

再次运行master:

[root@node2 bin]# ./kudu-master --flagfile=../conf/master.gflagfile

WARNING: Logging before InitGoogleLogging() is written to STDERR

F1122 17:58:20.281831 15935 init.cc:84] Check failed: _s.ok() Bad status: Not implemented: The CPU on this system (Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz) does not support the SSE4.2 instruction set which is required for running Kudu. If you are running inside a VM, you may need to enable SSE4.2 pass-through.

*** Check failure stack trace: ***

Aborted (core dumped)

 

安装了两天,还这样,心累,不玩了

参考文章:https://www.cnblogs.com/chengjunhao/p/9070945.html

 

 

 

 

 

你可能感兴趣的:(其他)