linux卸载软件adp,centos 7 ladp 安装

find / -name openldap*

yum install  openldap openldap-servers openldap-clients

[root@localhost openldap]# ls -al /usr/share/openldap-servers/

总用量 12

drwxr-xr-x.  2 root root   47 11月 27 10:58 .

drwxr-xr-x. 74 root root 4096 11月 27 10:58 ..

-rw-r--r--.  1 root root  845 9月  29 21:31 DB_CONFIG.example

-rw-r--r--.  1 root root 3717 9月  29 21:31 slapd.ldif

[root@localhost openldap]# pwd

/etc/openldap

[root@localhost openldap]# ls

cacerts  certs  check_password.conf  ldap.conf  schema  slapd.d

[root@localhost openldap]# cp /usr/share/openldap-servers/slapd.ldif /etc/openldap/slapd.conf

[root@localhost openldap]# ls

cacerts  certs  check_password.conf  ldap.conf  schema  slapd.conf  slapd.d

[root@localhost openldap]# cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

这个时候需要重新启动操作系统  也是必须重新启动

[root@localhost ldap]# service slapd start  启动服务

修改389这个端口

[root@localhost ldap]# slapd -f /etc/openldap/slapd.conf -h ldap://3891

创建超级管理员的密码

[root@localhost ldap]# slappasswd -h {SSHA}

New password:

Re-enter new password:

{SSHA}F3CdPHlDGMetltlxoXEg4MD9pZoZe9mH

[root@lcywx openldap]# vim slapd.d/cn\=config/olcDatabase={2}hdb.ldif

olcSuffix: dc=example,dc=com

#olcSuffix: dc=my-domain,dc=com

olcRootDN: cn=Manager,dc=example,dc=com

#olcRootDN: cn=Manager,dc=my-domain,dc=com

olcrootpw:      {SSHA}F3CdPHlDGMetltlxoXEg4MD9pZoZe9mH

loglevel 296

[root@lcywx openldap]# vim slapd.d/cn\=config/olcDatabase={1}monitor.ldif

olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external

,cn=auth" read by dn.base="cn=Manager,dc=example,dc=com" read by * none

[root@lcywx openldap]# more ldap.ldif

dn:dc=example,dc=com

objectclass:dcObject

objectclass:organization

o:Example, Inc.

dc:example

dn:cn=Manager,dc=example,dc=com

objectclass:organizationalRole

cn:Manager

-----------------------------------------------------------------------------------------------------

[root@localhost ldap]# vi  /etc/rsyslog.conf

local4.* /var/log/ldap.log

[root@localhost ldap]# service rsyslog restart

启动服务

[root@lcywx openldap]# service slapd start

加载导入数据

[root@lcywx openldap]# /usr/bin/ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f ldap.ldif

输入密码  没有报错误就加载成功了

然后就是到客户端了

51d8f8d6ecfcc61a373d4b457f918060.png

阅读(1266) | 评论(0) | 转发(0) |

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值