1. 程式人生 > >PHP 編譯後安裝擴充套件包

PHP 編譯後安裝擴充套件包

1.phpize 安裝

  進入原始碼包擴充套件目錄:

[[email protected] pdo_mysql]# cd /usr/local/src/php-5.6.13/ext/pdo_mysql
[[email protected] pdo_mysql]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
[[email protected] pdo_mysql]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=/usr --with-zlib-dir=/usr/local/lib [[email protected] pdo_mysql]make [[email protected] pdo_mysql]make install ......... more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so

  修改php.ini 檔案extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so,或者把 /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so 檔案放到php.ini 中指定擴充套件目錄,則新增extension =pdo_mysql.so即可

    注意:1,mysql yum 安裝的路徑是/usr, curl 編譯也是一樣新增

             2, --with-mysql=/usr ,--with-zlib-dir 不帶會報錯(configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information),開啟Zlib 庫支援。

curl 同上;

2.yum 安裝

   略。。。。。