LDAP簡介:php
LDAP(Lightweight Directory Access Protocol)的意思是"輕量級目錄訪問協議",是一個用於訪問"目錄服務器"(Directory Servers)的協議。這裏所謂的"目錄"是指一種按照樹狀結構存儲信息的數據庫。這個概念和硬盤上的目錄結構相似,不過LDAP的"根目錄"必須是"The world",而且其一級子目錄必須是"countries"。二級目錄一般包含有公司(companies)、組織(organisations)、地點(places)等等……相應的三級子目錄一般會包含人員(people)、設備(equipment)、文檔(documents)等等……html
安裝並開啓php-ldap:數據庫
①、下載本機上對應版本的php源碼服務器
②、cd /root/php-7.1.7/ext/ldapphp-fpm
③、執行 /usr/local/php/bin/phpizeui
④、./configure --with-php-config=/usr/local/php/bin/php-config --with-ldaphtm
⑤、make && make installip
⑥、打開php.ini,添加擴展 extension=ldap.so文檔
⑦、重啓php-fpm服務get
⑧、鍵入 php -m|grep ldap 查看模塊是否開啓
完畢!
遇到的問題以下
①:configure: error: Cannot find ldap.h
解決辦法 : yum -y install openldap openldap-devel
② :configure: error: Cannot find ldap libraries in /usr/lib.
解決辦法:
cp -frp /usr/lib64/libldap* /usr/lib/