安装OpenLdap
OpenLDAP学习笔记
CentOS 5.5 安装记录 - (7) LDAP安装和基本配置
Centos6 yum安装openldap+phpldapadmin+TLS+双主配置
LDAP管理工具:phpLDAPadmin 的安装配置
yum install openldap openldap-servers openldap-clients openldap-devel compat-openldap --setopt=protected_multilib=false
vi /etc/openldap/slapd.conf
ldapadd -D "cn=Manager,dc=openldap,dc=imback,dc=net" -W -x -f base.ldif
安装php-ldap扩展(这是基于LNMP里的PHP的扩展,LDAP未用到)
cd /home/package/lnmp/lnmp1.2-full/src/php-5.5.25/ext/ldap /usr/local/php/bin/phpize cp -frp /usr/lib64/libldap* /usr/lib/ ./configure -with-ldap -with-php-config=/usr/local/php/bin/php-config make make install ls -l /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/ vi /usr/local/php/etc/php.ini #然后添加 extension = "ldap.so"
PHPLDAPADMIN配置
vi /etc/httpd/conf/httpd.conf
Listen 8011
service httpd restart
vi /etc/phpldapadmin/config.php
$servers->setValue('server','host','127.0.0.1'); $servers->setValue('server','port',389); $servers->setValue('server','base',array('dc=openldap,dc=imback,dc=net')); $servers->setValue('login','auth_type','cookie'); $servers->setValue('login','bind_id','cn=Manager,dc=openldap,dc=imback,dc=net'); $servers->setValue('login','bind_pass','xxxxxxxxxxxxxx'); $servers->setValue('login','attr','dn');
添加用户流程
- 打开 http://openldap.imback.net/lam 点击添加用户
- 个人信息里:
- 名字,如:成磊
- 姓,如:乔
- unix里:
用户名(即uid),如:qiaochenglei 全名(即cn),如:qiaochenglei
- 点击保存