1. Download Pdo_mysql Package
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
2. Add PHP to make pdo_mysql.so files in its module directory
Tar zxf pdo_mysql-1.0.2.tgz
CD pdo_mysql-1.0.2
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/tcrm/php/bin/php-config--with-pdo-mysql=/usr/local/mysql
Make && make install
The system prompts the module to generate the/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/directory
3. Modify the php.ini file:
Extension_dir = "/usr/local/tcrm/php/lib/php/extensions/no-debug-non-zts-20060613/"
Extension=pdo_mysql.so
4. Restart Apache or Nginx (FastcGI) to reload the PHP configuration file.
Append compilation mbstring
cd/tmp/php-5.2.14/ext/mbstring/
# Call the Phpize program to generate the compilation configuration file
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/tcrm/php/bin/php-config
Make && make install
This article from "Zhaohaihua _ Yun-Wei Road" blog, please be sure to retain this source http://baiying.blog.51cto.com/1068039/784794