# wget
# tar xzvf PDO_MYSQL-1.0.2.tgz
# cd PDO_MYSQL-1.0.2
# /usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
注意:php安装在/usr/local/php下
经过configure就可以make了
./configure –with-php-config=/usr/local/php/bin/php-config -with-pdo-mysql=/usr/local/mysql/bin/mysql_config
make
make install
注意pdo_mysql的全路径是:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613//pdo_mysql.so
然后:
# vi //usr/local/php/lib/php.ini
加上一句:
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
保存后,重新启动apache即可看到已经加载pdo_mysql成功。
阅读(2400) | 评论(0) | 转发(0) |