LDAP管理工具PHPldapadmin

DevOps ldap评论3,637字数 2392阅读7分58秒阅读模式

安装httpd服务器

[root@i-68nhrdjj ~]# yum install httpd -y

修改配置文件httpd.conf

[root@i-68nhrdjj ~]# vim /etc/httpd/conf/httpd.conf
102 <Directory />
103     AllowOverride none
104     Require all denied
105 </Directory>

改为

102 <Directory />
103     Options Indexes FollowSymLinks
104     AllowOverride None
105 </Directory>

安装phpldapadmin

[root@i-68nhrdjj ~]# yum -y install epel-release
[root@i-68nhrdjj ~]# yum --enablerepo=epel -y install phpldapadmin

修改主配置文件

[root@i-68nhrdjj ~]# vim /etc/phpldapadmin/config.php

找到并取消一下行注释

298 $servers->setValue('server','host','127.0.0.1');

301 $servers->setValue('server','port',389);

305 $servers->setValue('server','base',array('dc=hebye,dc=com')); #array里加上openldap配置文件中设置的olcSuffix

323 $servers->setValue('login','auth_type','session');

397 $servers->setValue('login','attr','dn');

398 //$servers->setValue('login','attr','uid'); #把此行注释掉

修改phpldapadmin访问配置文件

[root@i-68nhrdjj ~]# vim /etc/httpd/conf.d/phpldapadmin.conf
#
#  Web-based tool for managing LDAP servers
#

Alias /phpldapadmin /usr/share/phpldapadmin/htdocs
Alias /ldapadmin /usr/share/phpldapadmin/htdocs

<Directory /usr/share/phpldapadmin/htdocs>
  <IfModule mod_authz_core.c>
    # Apache 2.4
    #Require local
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
  </IfModule>
</Directory>

访问web管理端

[root@i-68nhrdjj ~]# systemctl start httpd.service
[root@i-68nhrdjj ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@i-68nhrdjj ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-07-14 11:55:27 CST; 14s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 6784 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─6784 /usr/sbin/httpd -DFOREGROUND
           ├─6785 /usr/sbin/httpd -DFOREGROUND
           ├─6786 /usr/sbin/httpd -DFOREGROUND
           ├─6787 /usr/sbin/httpd -DFOREGROUND
           ├─6788 /usr/sbin/httpd -DFOREGROUND
           └─6789 /usr/sbin/httpd -DFOREGROUND

Jul 14 11:55:27 i-68nhrdjj systemd[1]: Starting The Apache HTTP Server...
Jul 14 11:55:27 i-68nhrdjj httpd[6784]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Jul 14 11:55:27 i-68nhrdjj systemd[1]: Started The Apache HTTP Server.

 

访问http://139.198.34.146:1956/phpldapadmin/

登陆用户名:cn=admin,dc=hebye,dc=com

密码:wdm123456

LDAP管理工具PHPldapadmin

LDAP管理工具PHPldapadmin

继续阅读
DevOps
  • 本文由 发表于 2022年7月14日 11:35:06
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
评论  0  访客  0

发表评论