共计 1900 个字符,预计需要花费 5 分钟才能阅读完成。
1、安装 OpenLDAP
yum install openldap openldap-*
service slapd start
2、下载
wget http://nchc.dl.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/1.2.3/phpldapadmin-1.2.3.tgz
tar -zxvf phpldapadmin-1.2.3.tgz
mv phpldapadmin /var/www/html/
3、配置服务
vi /etc/sysconfig/ldap,确保 SLAPD_LDAPI=yes
cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIGmv /etc/openldap/slapd.d{,.bak}
生成密码:
slappasswd
[root@LAMP ~]# slappasswd
New password:
Re-enter new password:
vi slapd.conf
找到语句:
suffix“dc=my-domain,dc=com”
将其改为:
suffix“dc=example,dc=com”
__
找到语句:
rootdn“cn=Manager,dc=my-domain,dc=com”
将其改为:
rootdn“cn=Manager,dc=example,dc=com”
__
找到语句:
rootpw secret
将其改为:
rootpw {SSHA}NddfeSDFESFrr#r
如下效果:
+++++++++++++++++++++++
database bdb
suffix “dc=example,dc=com”
checkpoint 1024 15
rootdn “cn=Manager,dc=example,dc=com”
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret
# rootpw {crypt}ijFYNcSNctBYg
_____________________
cd /var/www/html/phpldapadmin/config
cp config.php.example config.php
vim config.php
530 $servers->newServer(‘ldap_pla’);
531 $servers->setValue(‘server’,’name’,’LDAP Server’);
532 $servers->setValue(‘server’,’host’,’127.0.0.1′);
533 $servers->setValue(‘server’,’port’,389);
534 $servers->setValue(‘server’,’base’,array(‘dc=example,dc=com’));
535 $servers->setValue(‘login’,’auth_type’,’session’);
536 $servers->setValue(‘login’,’bind_id’,’cn=root,dc=example,dc=com’);
537 $servers->setValue(‘login’,’bind_pass’,’example.com’);
538 $servers->setValue(‘server’,’tls’,false);
OpenLDAP 的详细介绍 :请点这里
OpenLDAP 的下载地址 :请点这里
相关阅读:
Liferay Portal 配置使用 Oracle 和 OpenLDAP http://www.linuxidc.com/Linux/2012-07/66928.htm
Axigen+OpenLDAP+BerkeleyDB+ejabberd 多域 +JWchat 详细配置 http://www.linuxidc.com/Linux/2012-06/61598.htm
CentOS 部署 OpenLDAP 认证 http://www.linuxidc.com/Linux/2012-04/57932.htm