centos7 kudu源码编译安装centos7 64位;
内存：8G以上
存储空间：20G以上
支持SSE 4.2 supported
grep -q sse4_2 /proc/cpuinfo && echo “SSE 4.2 supported” || echo “SSE 4.2 not supported”
安装过程如下：
Install the prerequisite libraries, if they are not installed.
$ sudo yum install autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi
cyrus-sasl-plain flex gcc gcc-c++ gdb git java-1.8.0-openjdk-devel
krb5-server krb5-workstation libtool make openssl-devel patch
pkgconfig redhat-lsb-core rsync unzip vim-common which
If building on RHEL or CentOS older than 8.0, install the Red Hat Developer Toolset. Below are the steps required for CentOS. If you are on RHEL, follow their documentation here.
$ sudo yum install centos-release-scl-rh
$ sudo yum install devtoolset-8
Optional: If support for Kudu’s NVM (non-volatile memory) block cache is desired, install the memkind library.
$ sudo yum install memkind
If the memkind package provided with the Linux distribution is too old (1.8.0 or newer is required), build and install it from source.
$ sudo yum install numactl-libs numactl-devel
$ git clone https://gitee.com/memkind/memkind.git
$ cd memkind
$ ./build.sh --prefix=/usr
$ sudo yum remove memkind
$ sudo make install
$ sudo ldconfig
Optional: Install some additional packages, including ruby, if you plan to build documentation.
$ sudo yum install gem graphviz ruby-devel zlib-devel
If building on RHEL or CentOS older than 7.0, the gem package may need to be replaced with rubygems
Doxygen 1.8.19 or later is required to build the documentation, which has to be built from source manually. Building this version of Doxygen on CentOS or RHEL older than 8.0 also requires devtoolset.
Clone the Git repository and change to the new kudu directory.
$ git clone https://github.com/apache/kudu.git
$ cd kudu
Build any missing third-party requirements using the build-if-necessary.sh script. Not using the devtoolset will result in Host compiler appears to require libatomic, but cannot find it.
$ build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh
Build Kudu, using the utilities installed in the previous step. Choose a build directory for the intermediate output, which can be anywhere in your filesystem except for the kudu directory itself. Notice that the devtoolset must still be specified, else you’ll get cc1plus: error: unrecognized command line option “-std=c++17”.
$ mkdir -p build/release
cd build/release
../../build-support/enable_devtoolset.sh ../../thirdparty/installed/common/bin/cmake -DCMAKE_BUILD_TYPE=release -DNO_TESTS=1 ../..
make -j4
$ sudo make DESTDIR=/opt/kudu install
Optional: Build the documentation. NOTE: This command builds local documentation that is not appropriate for uploading to the Kudu website.
$ make docs
注意事项：1 如果安装时直接 sudo make install:
kudu-tserver and kudu-master executables in /usr/local/sbin
Kudu command line tool in /usr/local/bin
Kudu client library in /usr/local/lib64/
Kudu client headers in /usr/local/include/kudu
默认目录是 /usr/local.
2 . 编译时加上 -DNO_TESTS=1 否则需要的存储空间极大。
整个编译至少需要8G内存，10G以上空间，最好是20G以上。否则可能报空间不足。
配置kudu:
master 的配置文件，创建于conf 目录下，vi master.gflagfile:
--fs_wal_dir=/opt/kudu/master/wal --fs_data_dirs=/opt/kudu/master/data --log_dir=/opt/kudu/master/logs --webserver_doc_root=/opt/kudu/www --rpc_bind_addresses=0.0.0.0:7051 --default_num_replicas=3
tserver的配置文件，创建于conf 目录下，vi tserver.gflagfile:
--fs_data_dirs=/opt/kudu/tserver/data --fs_metadata_dir=/opt/kudu/tserver/metedata --fs_wal_dir=/opt/kudu/tserver/wal --log_dir=/opt/kudu/tserver/logs -–tserver_master_addrs=127.0.0.1:7051 --webserver_doc_root=/opt/kudu/www --default_num_replicas=3
启动：
/opt/kudu/usr/local/sbin/kudu-master --flagfile=/opt/kudu/conf/master.gflagfile &
/opt/kudu/usr/local/sbin/kudu-tserver --flagfile=/opt/kudu/conf/tserver.gflagfile &
注意：以上不存在的目录文件都手工创建。webserver_doc_root从安装软件里面复制过来。default_num_replicas默认是3，如果是单机则改成1