首页 > 代码库 > 安装PDO_Mysql

安装PDO_Mysql

在安装phpwind的时候显示没有安装PDO_Mysql

网上搜的倒是很多,不过看起来好难的样子

这里把我的步骤贴出来做个笔记

[root@duwers ~]# wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz  #down一个源码包
[root@duwers ~]# tar zxfPDO_MYSQL-1.0.2.tgz
[root@duwers ~]# cd PDO_MYSQL-1.0.2
[root@duwers PDO_MYSQL-1.0.2]#/usr/local/php/bin/phpize   
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
[root@duwers PDO_MYSQL-1.0.2]#
[root@duwers PDO_MYSQL-1.0.2]# ./configure--with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql/
[root@duwers PDO_MYSQL-1.0.2]# ln -s/usr/local/mysql/include/* /usr/local/include/ #不这样或许会报错
[root@duwers PDO_MYSQL-1.0.2]# make&& make install

#完成的显示

PATH="$PATH:/sbin" ldconfig -n/root/PDO_MYSQL-1.0.2/modules

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

Libraries have been installed in:

  /root/PDO_MYSQL-1.0.2/modules

 

If you ever happen to want to link againstinstalled libraries

in a given directory, LIBDIR, you musteither use libtool, and

specify the full pathname of the library,or use the `-LLIBDIR‘

flag during linking and do at least one ofthe following:

   -add LIBDIR to the `LD_LIBRARY_PATH‘ environment variable

    during execution

   -add LIBDIR to the `LD_RUN_PATH‘ environment variable

    during linking

   -use the `-Wl,--rpath -Wl,LIBDIR‘ linker flag

   -have your system administrator add LIBDIR to `/etc/ld.so.conf‘

 

See any operating system documentationabout shared libraries for

more information, such as the ld(1) andld.so(8) manual pages.

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

 

Build complete.

Don‘t forget to run ‘make test‘.

 

Installing shared extensions:    /usr/local/php/lib/php/extensions/no-debug-zts-20131226/

修改php.ini

[root@duwers PDO_MYSQL-1.0.2]# vim/usr/local/php/php.ini
#修改下面的内容
extension_dir ="/usr/local/php/lib/php/extensions/no-debug-zts-20131226/"
extension=pdo_mysql.so

重启apache

/etc/init.d/apache2.4 restart


本文出自 “duwers” 博客,请务必保留此出处http://duwers.blog.51cto.com/7376225/1856309

安装PDO_Mysql