85

教大家如何在Linux(CentOS6.5)上安装PHP PDO扩展库

 5 years ago
source link: https://www.linuxprobe.com/linux-cents-phpodd.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

下面给大家分享PDO扩展如何在CentOS6.5上安装(蓝色字体为命令)

1.cd php-7.2.0/ext/pdo_mysql //具体路径自行修改
2./usr/local/php/bin/phpize//建立PHP的外挂模块
3../configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=mysqlnd//一系列的配置
4.make&&make install//emmm...不用解释吧
5.vi /etc/php.ini//若没有此文件请执行:cd php-7.2.0 丨 cp php.ini-development /etc/php.ini ,执行成功后再执行此步骤
6.在普通模式上输入 /pdo 快速定位到pdo配置项
7.去掉 extension=php_pdo_mysql.dll 的注释 修改为 extension=pdo_mysql.so 保存。
8.执行php -m
9.若有 pdo_mysql && pdo_sqlite 这两个扩展,则代表安装完成。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK