Configure phpldapadmin for OpenLDAP Server (CentOS 7)

A. Server Configuration
    For detailed LDAP configuration please visit this post.

B. Install phpldapadmin on same server

1.  Install epel repository on the server
    # rpm -ivh

2.  Install phpldapadmin package
     #yum install phpldapadmin

3. Take backup of phpldapadmin config file and make the necessary changes
    # cp config.php config.php.orig
    # vi config.php
    Go to line 397 comment it and uncomment line 398
     // $servers->setValue('login','attr','uid');

4. Enable httpd service and add firewall rules for httpd service
    #systemctl enable httpd
    #firewall-cmd --permanent --add-port=80/tcp
    #firewall-cmd --reload

5. Try to access phpldapadmin page
    while accessing the page It gives below error

6. To resolve this Edit the apache configuration file for phpldapadmin
    #cd /etc/httpd/conf.d/
    #vi phpldapadmin.conf
    change the entry from "require local" to "require all granted"
    Save config file and reload apache service
    #systemctl reload httpd

7. Now open the page
8. Login on the server

9. Now edit the phpldapadmin config file and change The name from Local LDAP server to LDAP server on Line no 291
    #cd /etc/phpldapadmin
    #vi config.php

10. Refresh the page without restarting/reloading httpd service

B. Install phpldapadmin on different server 
1. All steps will be same for installation and configuration phpldapadmin on different server.
    Only below additional change in phpldapadmin config is required  on line no 298 
    Change IP address from to OpenLDAP server IP address

2. Access the phpldapadmin webpage on the server

1. We can configure  phpldapadmin on same server or another server.
2. Managing users and groups on OpenLDAP server becomes easy.