1、下载源码rakafka源码
https://github.com/confluentinc/librdkafka
2、安装openssl,可以参考
https://www.cnblogs.com/ho966/p/15916018.html
3、如果要支持gssapi, 需要依赖cyrus-sasl 和krb5
3.1 安装krb5
下载源码https://kerberos.org/dist/krb5/1.20/krb5-1.20.1.tar.gz
解压缩 tar -xzvf krb5-1.20.1.tar.gz
进入目录 cd ./krb5-1.20.1/src
配置安装目录 ./configure --prefix=/root/share/git/krb5/bin --disable-rpath
编译及安装 make && make install
编译报错yacc: Command not found, yacc(Yet Another Compiler Compiler),是Unix/Linux上一个用来生成编译器的编译器,centos安装 byacc,yum install byacc
3.2 安装cyrus-sasl
下载源码https://github.com/cyrusimap/cyrus-sasl
./autogen.sh 生成configure,
如果报错aclocal: command not found,执行安装 yum install automake-1.13.4-3.el7.noarch
如果报错 error: possibly undefined macro: AC_DISABLE_STATIC 执行安装 yum install libtool-2.4.2-22.el7_3.x86_64
执行LDFLAGS="-L/root/share/git/krb5/bin/lib" CPPFLAGS="-I/root/share/git/krb5/bin/include" ./configure --with-dblib=lmdb --prefix=/root/share/git/cyrus-sasl/bin/
执行 make && make install
4、编译rdkafka
./configure --prefix=/root/share/git/rdkafka/bin --enable-ssl --enable-gssapi --CFLAGS="-I/root/share/git/openssl/include -I/root/share/git/cyrus-sasl/bin/include" --LDFLAGS="-L/root/share/git/openssl/lib -L/root/share/git/cyrus-sasl/bin/lib"
标签:krb5,bin,git,--,share,编译,rdkafka,root From: https://www.cnblogs.com/ho966/p/17688412.html