编译bdb
1、所执行命令:
../dist/configure --prefix=/opt/test/bdb
报错,错误详情:
configure: error: cannot guess build type; you must specify one
解决方法:
需要指定编译环境:
如果是arm环境,需要指定arm-linux;
如果是x86环境,可以不用指定;
我本次是在arm环境编译的,所以需要指定arm-linux。
--build=arm-linux
--host=arm-linux
完整命令:
../dist/configure --prefix=/opt/test/bdb --build=arm-linux --host=arm-linux
2、make && make install
3、将部署目录的文件打包,做成解压可用的绿色版。
编译openldap
openldap的编译依赖于bdb。
1、所执行命令:
./configure --prefix=/home/security/software/openldap --enable-debug --enable-syslog --enable-proctitle --enable-ipv6 --enable-local --enable-modules --enable-bdb --enable-hdb --enable-ldap --enable-mdb --enable-overlays CPPFLAGS=-I/opt/test/bdb/include/ LDFLAGS=-L/opt/test/bdb/lib/ --libdir=/opt/test/bdb/lib/ --includedir=/opt/test/bdb/include/
编译报错,错误详情:
configure: error: could not locate libtool ltdl.h
解决:
安装 libtool-ltdl libtool-ltdl-devel就可以了。
arm环境,可以使用apt源安装;
x86环境,可以使用yum源安装。
2、所执行命令:
./configure --prefix=/home/security/software/openldap --enable-debug --enable-syslog --enable-proctitle --enable-ipv6 --enable-local --enable-modules --enable-bdb --enable-hdb --enable-ldap --enable-mdb --enable-overlays CPPFLAGS=-I/opt/test/bdb/include/ LDFLAGS=-L/opt/test/bdb/lib/ --libdir=/opt/test/bdb/lib/ --includedir=/opt/test/bdb/include/
编译报错,错误详情:
checking for Berkeley DB library and header version match... Berkeley DB version mismatch
header: Berkeley DB 5.3.21: (May 11, 2012)
library: Berkeley DB 5.3.28: (September 9, 2013)
no
configure: error: Berkeley DB version mismatch
解决办法:
export LD_LIBRARY_PATH="/opt/test/bdb/lib"
3、之前编译openldap源码缺少密码策略模块的问题:
原因:缺少编译参数,如上命令configure过程添加--enable-overlays这个参数可以解决。
4、configure操作通过之后,执行命令:
make depend
5、执行:
make && make install
6、编译完成后,将安装目录下的文件全部打包,得到解压可用的绿色版组件包。
keepalived编译
1、./configure --prefix=/home/security/software/keepalived
注:本过程缺少参数,导致编译后日志配置不生效;需要加参数,所加参数为:--enable-log-file;
完整命令为:
./configure --prefix=/home/security/software/keepalived --enable-log-file
此处执行报错了:
关键错误:
“configure: error: libnfnetlink headers missing”
错误详情:
checking for nl_socket_modify_cb in -lnl... yes
checking for linux/rtnetlink.h... yes
checking libnfnetlink/libnfnetlink.h usability... no
checking libnfnetlink/libnfnetlink.h presence... no
checking for libnfnetlink/libnfnetlink.h... no
configure: error: libnfnetlink headers missing
解决方法:
安装libnfnetlink-devel依赖;
arm环境选择apt源安装;
x86环境选择yum源安装;
如果不想通过源安装,可自行下载rpm包安装。
2、make && make install
3、编译完成后,将安装目录下的文件全部打包,得到解压可用的绿色版组件包。
kerberos源码编译
1、./configure --prefix=/home/security/software/kerberos --enable-dns-for-realm
注:--enable-dns-for-realm 支持ipv6的解析
2、make && make install
3、编译完成后,将安装目录下的文件全部打包,得到解压可用的绿色版组件包。