PHP下mysql扩展安装

[root@localhost ~]# cd /usr/local/src/php-5.5.16/ext/mysql
[root@localhost mysql]# /srv/php-5.5.16/bin/phpize 

Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
[root@localhost mysql]# ./configure --with-php-config=/srv/php-5.5.16/bin/php-config 
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes

……

……

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@localhost mysql]# make
/bin/sh /usr/local/src/php-5.5.16/ext/mysql/libtool --mode=compile cc  -I. -I/usr/local/src/php-5.5.16/ext/mysql -DPHP_ATOM_INC -I/usr/local/src/php-5.5.16/ext/mysql/include -I/usr/local/src/php-5.5.16/ext/mysql/main -I/usr/local/src/php-5.5.16/ext/mysql -I/srv/php-5.5.16/include/php -I/srv/php-5.5.16/include/php/main -I/srv/php-5.5.16/include/php/TSRM -I/srv/php-5.5.16/include/php/Zend -I/srv/php-5.5.16/include/php/ext -I/srv/php-5.5.16/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/src/php-5.5.16/ext/mysql/php_mysql.c -o php_mysql.lo 
mkdir .libs

……

……

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

Build complete.
Don't forget to run 'make test'.


[root@localhost mysql]# make install
Installing shared extensions:     /srv/php-5.5.16/lib/php/extensions/no-debug-zts-20121212/

[root@localhost mysql]# vim /srv/php-5.5.16/etc/php.ini

[root@localhost mysql]# /etc/init.d/php-fpm restart

Gracefully shutting down php-fpm . done
Starting php-fpm  done

[root@localhost mysql]# /etc/init.d/nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

[root@localhost ~]# /srv/php-5.5.16/bin/php -m | grep mysql
mysql
mysqli
mysqlnd
pdo_mysql

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值