首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > 其他操作系统 > Openldap安装实录
【标  题】:Openldap安装实录
【关键字】:Openldap
【来  源】:http://www.cublog.cn/u/18637/showart.php?id=245739

Openldap安装实录

Openldap安装实录[转载并补充]

首先到www.openldap.org下载最新的版本,我下载的版本是2.3.4。解压缩该文件,
tar –zxvpf openldap-release.tgz
cd openldap-2.3.4
./configure

配置到一半时提示checking Berkeley DB version for BDB backend… no
configure: error: BDB/HDB: BerkeleyDB version imcompatible
原来没有安装Berkeley DB数据库,到www.sleepycat.com下载最新的版本,我下载的版本是4.3.28。解压缩该文件,
tar –zxvf db-4.3.28.tar.gz
cd db-4.3.28
cd build_unix
../dist/configure
make
make install
经过几分钟的等待,编译完成。在/usr/local/目录下会新建一个目录BerkeleyDB.4.3,Berkeley DB就安装在这个目录里。

再到Openldap目录再次执行./configure提示
checking Berkeley DB version for BDB backend… no
configure: error: BDB/HDB: BerkeleyDB version imcompatible
难道我数据库没有安装好??在网上找资料终于找到了。输入如下命令
env CPPFLAGS="-I /usr/local/BerkeleyDB.4.3/include"
LDFLAGS="-L /usr/local/BerkeleyDB.4.3/lib" ./configure
试了一下还是不行。会不会是库文件没有找到!
于是把/usr/local/BerkeleyDB.4.3/include中的所有文件拷贝到/usr/include
/usr/local/BerkeleyDB.4.3/lib中的所有文件拷贝到/usr/lib
运行./configure通过
再次出现错误提示没有Cyrus SASL library
在asg.web.cmu.edu下载最新的版本,我下载的版本是2.1.20

tar –zxvf cyrus-sasl-2.1.20.tar.gz
cd cyrus-sasl-2.1.20
./configure
make
make install

第三次执行./configure成功提示make depend
make
make test
cd tests; make test
make[1]: Entering directory `/home/liudan/openldap-2.3.4/tests'
make[2]: Entering directory `/home/liudan/openldap-2.3.4/tests'
Initiating LDAP tests for BDB...
Running ./scripts/all...
>>>>> Executing all LDAP tests for bdb
>>>>> Starting test000-rootdse ...
running defines.sh
Starting slapd on TCP/IP port 9011...
Using ldapsearch to retrieve the root DSE…
Waiting 5 seconds for slapd to start …
Waiting 5 seconds for slapd to start …
Waiting 5 seconds for slapd to start …
Waiting 5 seconds for slapd to start …
Waiting 5 seconds for slapd to start …
Waiting 5 seconds for slapd to start …

./scripts/test000-rootdse: line 61: kill: (3538) – No such process
ldap_bind: Can’t contact LDAP server (-1)

通过查看slapd.1.log

root@gregorian:/tmp/openldap-2.3.4/servers/slapd
daemon_init: ldap://localhost:9011/
daemon_init: listen on ldap://localhost:9011/
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap://localhost:9011/)
daemon: initialized ldap://localhost:9011/
daemon_init: 1 listeners opened
slapd init: initiated server.
slap_sasl_init: SASL library version mismatch: expected 2.1.20, got 2.1.10
slapd destroy: freeing system resources.
slapd stopped.
connections_destroy: nothing to destroy.
RedHat 9默认安装的是2.1.10,删除/usr/lib下所有的lib*sasl*so的文件,

再从新安装Cyrus SASL library,再次安装Openldap
./configure && make depend && make  && make test && make install
安装完成。

快速安装的步骤
tar –zxvf db-4.3.28.tar.gz
cd db-4.3.28
cd build_unix
../dist/configure && make && make install
cp /usr/local/BerkeleyDB.4.3/include/* /usr/include
cp /usr/local/BerkeleyDB.4.3/lib/* /usr/lib

tar –zxvf cyrus-sasl-2.1.20.tar.gz
cd cyrus-sasl-2.1.20
./configure && make && make install
rm –f /usr/lib/lib*sasl*so*

tar –zxvpf openldap-release.tgz
cd openldap-2.3.4
./configure && make depend && make && make test && make install

本次安装历经几天,(水平较低)终于成功,总结出一些体会。
1在安装软件前,一定要仔细看README。
2在遇到问题要多用网络资源,尤其是英文的。

补充:
我在进行make test的时候仍然出现
error while loading shared libraries: libsasl2.so.2
这样的问题,我发现libsasl2.so.2这个文件在/usr/local/lib下,而不是在/usr/lib下,我的解决方法是修改/etc/ld.so.conf文件,加入/usr/local/lib,之后
ldconfig
可以通过ldconfig -v命令查看

双线策略路由pf.conf:【上一篇】
毛新宇的第一任妻子竟然2003年死于秦城监狱!:【下一篇】
【相关文章】
  • how to add sudo into openldap?
  • 关于openldap的安装与配置
  • 连接OpenLDAP时,设定Network Time out时间的方法
  • 关于OpenLDAP查询以后的内存释放
  • openLDAP 初次尝试
  • OpenLDAP+FreeRADIUS+MySQL+RP-PPPOE 构建PPPOE服务器
  • Red Hat Enterprise Linux4.0下OpenLDAP 2.3.24的安装
  • OpenLDAP管理员指南
  • OpenLDAP Software 2.3 Administrator's Guide
  • OpenLDAP -- Unrecognized database type (bdb)
  • 【随机文章】
  • 我做的flash里面就只有一首歌,和这首歌的歌词
  • Linux下netstat命令
  • 系统设计基本原则--输入、输出以及扩展
  • EJB3.0学习(一)运行环境配置
  • D3D坐标系统和几何-DirectX Griaphic学习
  • Unix编程常见问题解答二
  • 一些关于Visual Studio 2005 代码段(Code Snippet)的信息
  • 校园网认证系统-802.1x协议介绍
  • 函数堆栈结构
  • 让Windows的时钟为Word所用
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.