phpldapadmin工具安装(Centos7)

 

openLdap安装(安装包含:ldap安装、客户端sssd同步、ssh集成)
参考地址:https://blog.csdn.net/belialxing/article/details/87878614

 

如下是ldap客户端工具(phpldapadmin)的安装。


【防火墙关闭】
######关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
######关闭SELinux
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
cat /etc/selinux/config

1、获取epel源
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-11.noarch.rpm ## rpm可能会更新,所以下载不到.可自己搜索最新的
2、
rpm -ivh epel-release-7-11.noarch.rpm
3、
yum -y install httpd php php-ldap php-gd php-mbstring php-pear php-bcmath php-xml
4、
yum -y install phpldapadmin

5、将安装后的文件部署到apache:
ln -s /usr/share/phpldapadmin /var/www

6、修改配置 config.php
cd /var/www/phpldapadmin/config
cp config.php  config.php_backup
vim /etc/phpldapadmin/config.php
修改下列/etc/phpldapadmin/config.php选项,注意行首不要有空格:
$servers->newServer('ldap_pla');
$servers->setValue('server','name','cdh LDAP Server');
$servers->setValue('server','host','172.xx.xx.11');
$servers->setValue('server','port',389); 
$servers->setValue('server','base',array('dc=tcjf,dc=com'));
$servers->setValue('login','auth_type','session');
$servers->setValue('login','attr','dn');
// $servers->setValue('login','attr','uid');//注释这里 因为修改的是php用"//"注释代码

7、修改配置 phpldapadmin.conf
vim /etc/httpd/conf.d/phpldapadmin.conf
将"Require local" 修改为 "Require all granted"
###################################################

 
    # Apache 2.4
     Require local
     #Require 172.18.238.34 
     Require all granted
 

 
    # Apache 2.2
    Order Deny,Allow
    Allow from all
    #Deny from all
    #Allow from 127.0.0.1
    #Allow from ::1
 


###################################################


8、重启服务
systemctl enable httpd
systemctl restart httpd
systemctl status httpd

9、访问
http://172.xx.xx.12/phpldapadmin/index.php

账号:cn=Manager,dc=tcjf,dc=com
密码:xxxxx
 

phpldapadmin工具安装(Centos7)_第1张图片

你可能感兴趣的:(学习博客)