php7.2安裝ldap擴展模塊

安裝使用php

   [下載php7.2.13](http://php.net/downloads.php)
 編譯安裝
 ./configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-config-file-scan-dir=/usr/local/php/etc/php.d' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-fpm' '--enable-opcache' '--disable-fileinfo' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir=/usr/local' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-exif' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl=/usr/local/curl' '--enable-mbregex' '--enable-mbstring' '--with-password-argon2' '--with-sodium=/usr/local' '--with-gd' '--with-openssl=/usr/local/openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-ftp' '--enable-intl' '--with-xsl' '--with-gettext' '--enable-zip' '--enable-soap' '--disable-debug'
 make  -j 4&& make install

安裝ldap擴展模塊

先安裝openldap

[root@mha-master ]# yum install openlda
[root@mha-master ]# yum install openldap-devel    

如果你是64位,請拷貝相關文件,或創建軟鏈

[root@mha-master ]# ln -sv  /usr/lib64/libldap* /usr/lib/ 

然後進入PHP對應版的源碼

 [root@mha-master ext]# pwd
     /lnmp/src/php-7.2.13/ext

切換到ldap目錄

 [root@mha-master ext ]# cd ldap/
 [root@mha-master ldap ]#  /usr/local/php/bin/phpize
 [root@mha-master ldap ]# ./configure --with-php-config=/usr/local/php/bin/php-config
 [root@mha-master ldap ]# make && make install

最後在php.ini中添加擴展文件

 [root@mha-master ldap]# vim /usr/local/php/etc/php.ini
        extension=ldap.so
#### 重啓php 使用 php -m查看模塊
 [root@mha-master ldap]# php -m

php7.2安裝ldap擴展模塊

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章