Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This article takes CentOS6.5 compilation and installation of Nginx1.70 + PHP5.59 + MySQL5.6.16 as a prerequisite.
Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This article takes CentOS6.5 compilation and installation of Nginx1.70 + PHP5.59 + MySQL5.6.16 as a prerequisite.
Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This document usesCentOS6.5 compile and install Nginx1.70 + PHP5.59 + MySQL5.6.16.
For example, (php version 5.5.9, installation directory/usr/local/php5, source code directory/opt/softs/-php5.5.9, you need to add pdo_mysql support ):
Go to the php source code directory
> Cd/opt/softs/php-5.5.9/ext/pdo_mysql
>/Usr/local/php5/bin/phpize
>./Configure-with-php-config =/usr/local/php5/bin/php-config-with-pdo-mysql =/usr/local/mysql/
> Make & make install.
After that, the system prompts the directory where the pdo_mysql.so file is located (/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212 ).
Modify php. ini
Add an extension =/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/pdo_mysql.so
Restart service
> Service php-fpm restart
Original article address: Use phpize in centos to add extension libraries for PHP without re-Compiling. Thank you for sharing it with the original author.