First of all, ensure Linux normal networking
Yum Install OpenLDAP-servers- y
Copy configuration file
cd/usr/share/openldap-servers/
CP SLAPD. conf.OBSOLETE/ETC/OPENLDAP/SLAPD.conf
Create an LDAP administrator password
slappasswd
Input 123456 For example
New Password:
Re-enter New password:
{Ssha}lqzythq/qszjrapzvi+d08jnbamz9tws
Edit SLAPD configuration file
VIM/ETC/OPENLDAP/SLAPD. conf
Delete the default configuration (otherwise an error will be added when LDAP user)
RM-RF/ETC/OPENLDAP/SLAPD. D/*
Set directory Permissions
Chown- R ldap:ldap/etc/openldap/
Chown- R ldap:ldap/var/lib/ldap
Restart Service
Service SLAPD Restart
Daemon process
Chkconfig SLAPD on
Modify file owner and owning group
Chown-r Ldap:ldap/var/lib/ldap
Chown-r Ldap:ldap/etc/openldap
Regenerate slapd.conf
Slaptest-f/etc/openldap/slapd.conf-f/etc/openldap/slapd.d/
This displays the config file testing succeeded
Modify the owner and owning group of the newly generated file in the SLAPD.D directory and restart the SLAPD service
Chown-r ldap:ldap/etc/openldap/slapd.d/*
Service SLAPD Restart
Reference http://www.300176.net/detail/39204842120460507007.html
Reference http://blog.csdn.net/ztq157677114/article/details/50538176
Linux environment to build LDAP server