首先贴上配置参数
./configure --disable-pdo --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-kerberos --with-libxml-dir=/opt/xml2/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-jpeg-dir=/usr/local/jpeg --with-gd=/usr/local/gd --with-zlib --with-zlib-dir=/usr -enable-mbstring --with-curl=/usr/local/curl --with-openssl=/usr/local/openssl
1.下载jpeg6b安装
2.下载GD安装
3.下载curl安装
4.下载openssl安装
5.编译PHP
./configure --enable-pdo --with-pdo-mysql=/usr --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-kerberos --with-libxml-dir=/opt/xml2/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-jpeg-dir=/usr/local/jpeg --with-gd=/usr/local/gd --with-zlib --with-zlib-dir=/usr
#wget
#tar xzvf PDO_MYSQL-1.0.2.tgz
#cd PDO_MYSQL-1.0.2
#/usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
#./configure
--with-php-config=/usr/local/php/bin/php-config
--with-pdo-mysql=/usr/local/mysql
#make
#make install
注意pdo_mysql的全路径
/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
修改php.ini
#vi /usr/local/php/etc/php.ini
加上
extension=pdo_mysql.so
./configure --enable-pdo --with-pdo-mysql=/usr --with-curl=/usr/curl --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-kerberos --with-libxml-dir=/opt/xml2/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-jpeg-dir=/usr/local/jpeg --with-gd=/usr/local/gd --with-zlib --with-zlib-dir=/usr
阅读(2657) | 评论(0) | 转发(0) |