linux下openldap 的安装与配置本身总结版

---恢复内容开始---数据库

前段时间公司须要安装openldap 因而去网上查找相关资料,安装文档却是很多可是或多或少都有点问题 致使本身一直没有安装上,因而结合英文安装文档磕磕巴巴的app

安装少了 因而将安装过程记录下来 以备不时之需ui

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

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


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

安装:文档

# cd db_4.7.25it

# cd build_unix/io

# ./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 


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

 

 

 

 

 

 

 

 

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

相关文章
相关标签/搜索