码迷,mamicode.com
首页 > 系统相关 > 详细

linux下openldap 的安装与配置自己总结版

时间:2016-12-29 10:39:38      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:文件   ssi   should   int   lan   directory   资料   出错   openldap   

---恢复内容开始---

前段时间公司需要安装openldap 于是去网上查找相关资料,安装文档倒是不少但是或多或少都有点问题 导致自己一直没有安装上,于是结合英文安装文档磕磕巴巴的

安装少了 于是将安装过程记录下来 以备不时之需

1:新旧版本的OpenLDAP,配置方法有很大的改动

1、安装数据库本人用的版本是:Berkeley DB 4.7.25


解压:  # tar xvf db-4.7.25.tar.gz

安装:

# cd db_4.7.25

# cd build_unix/

# ./dist/configure -prefix=/usr/local/BerkeleyDB

# make

# make install

为了编译openldap 不出错执行下一步

 # cp /usr/local/BerkeleyDB/include/* /usr/include/

 #  cp /usr/local/BerkeleyDB/lib/* /usr/lib/

安装Berkeley DB比较简单 基本上不会报错

2:第二步安装openldap 

本人版本是:openldap-2.4.9.tgz

    #  tar xvf openldap-2.4.15.tgz

      #  cd openldap-2.4.15/

      # ./configure --prefix=/usr/local/openldap

      #  make depend

      # make

      # make install

3:配置slapd.conf文件 

#

# See slapd.conf(5) for details on configuration options.

# This file should NOT be world readable.

#

include           /usr/local/openldap/etc/openldap/schema/core.schema   这里我是用的自定义属性 所以其他的schema文件不需要添加如果需要可以添加就可以

# Define global ACLs to disable default read access.

 

# Do not enable referrals until AFTER you have a working directory

# service AND an understanding of referrals.

#referral  ldap://root.openldap.org

 

pidfile       /usr/local/openldap/var/run/slapd.pid          首先看看这两个文件存不存在 我之前安装就没有存在又重新装的

argsfile    /usr/local/openldap/var/run/slapd.args  

 

#######################################################################

# BDB database definitions

#######################################################################

 

database  bdb

suffix             "dc=example,dc=com"  根节点

rootdn            "cn=Manager,dc=example,dc=com"    用户名

# Cleartext passwords, especially for the rootdn, should

# be avoid.  See slappasswd(8) and slapd.conf(5) for details.

# Use of strong authentication encouraged.

rootpw           secret   密码可以自行设置

# The database directory MUST exist prior to running slapd AND

# should only be accessible by the slapd and slap tools.

# Mode 700 recommended.

directory /usr/local/openldap/var/openldap-data

# Indices to maintain

index       objectClass     eq

 

配置完之后基本完成

使用

 cd /usr/local/openldap/libexec/

./slapd -d 256 


启动完成只要不报错说明安装成功

 

 

 

 

 

 

 

 

---恢复内容结束---

linux下openldap 的安装与配置自己总结版

标签:文件   ssi   should   int   lan   directory   资料   出错   openldap   

原文地址:http://www.cnblogs.com/wangbodang/p/6231905.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!