安裝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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章