编译及load mydqli.so文件

(1)cd /usr/local/php-5.2.17/ext/mysqli
(2)输入/usr/local/php/bin/phpize 回车
(3)./configure --prefix=/usr/local/mysqli --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/bin/mysql_config
(4)make
(5)make test
(6)make intall
(7)成功后在/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/下生成mysqli.so文件
(8)创建ext目录 cd /usr/local/php/ mkdir ext
(9)将mysqli.so文件copy 到ext下
cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/mysqli.so /usr/local/php/ext
(10)vi /usr/local/php/lib/php.ini
修改extension_dir="/usr/local/php/ext"
添加 extension=mysqli.so
保存php.ini文件
(11)重启/usr/local/php/sbin/php-fpm restart

----------------------------------------------------------------------------------------------------------------------------------

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

运行/usr/local/webserver/php/bin/phpize时出现:
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
根据网上的解决办法是:

# cd /usr/src
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# tar -zvxf m4-1.4.9.tar.gz
# cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install
可爱的yum让我更容易把没安装的包安装好
 yum install m4
 yum install autoconf
http://tech.fblife.com/?p=106
原文地址:https://www.cnblogs.com/huidaoli/p/3729035.html