[root@ldap ~]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
[root@ldap ~]# cat /etc/centos-release-upstream
Derived from Red Hat Enterprise Linux 7.6 (Source)
[root@ldap ~]# slapd -VV
@(#) $OpenLDAP: slapd 2.4.44 (Jan 29 2019 17:42:45) $
mockbuild@x86-01.bsys.centos.org:/builddir/build/BUILD/openldap-2.4.44/openldap-2.4.44/servers/slapd
systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --state
sed -i "s/SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
getenforce
yum install -y openldap openldap-clients openldap-servers openldap-devel
[root@ldap ~]# slappasswd
New password:
Re-enter new password:
{SSHA}xEf8gD+MK8D3q0sIb7Idu8tg1fMcll98
sed -i -e "s/olcSuffix:.*/olcSuffix: dc=abu,dc=pub/g" -e "s/olcRootDN:.*/olcRootDN: cn=root,dc=abu,dc=pub/g" /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{2\}hdb.ldif
echo "olcRootPW: {SSHA}xEf8gD+MK8D3q0sIb7Idu8tg1fMcll98" >> /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{2\}hdb.ldif
sed -i "s/cn=Manager,dc=my-domain,dc=com/cn=root,dc=abu,dc=pub/g" /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{1\}monitor.ldif
cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
chown ldap:ldap -R /var/lib/ldap
chmod 700 -R /var/lib/ldap
slaptest -u
chown ldap:ldap -R /var/run/openldap
chown -R ldap:ldap /etc/openldap/
systemctl start slapd
systemctl enable slapd
ldapsearch -x -b '' -s base'(objectclass=*)'
cat > base.ldif << EOF
dn: dc=abu,dc=pub
o: domain
dc: abu
objectClass: top
objectClass: dcObject
objectclass: organization
dn: cn=root,dc=abu,dc=pub
cn: root
objectClass: organizationalRole
description: Directory Manager
dn: ou=People,dc=abu,dc=pub
ou: People
objectClass: top
objectClass: organizationalUnit
dn: ou=Group,dc=abu,dc=pub
ou: Group
objectClass: top
objectClass: organizationalUnit
EOF
ldapadd -x -D "cn=root,dc=abu,dc=pub" -W -f base.ldif
https://blog.csdn.net/qq_21383435/article/details/83506791#22_phpLDAPadmin_11
http://www.pianshen.com/article/112350307/
https://www.cnblogs.com/linuxws/p/9084455.html
https://www.cnblogs.com/qiuxiangmuyu/p/6437937.html
https://www.ibm.com/developerworks/cn/linux/1406_liulz_pamopenldap/