(1)下载压缩包:wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
(2)解压:tar -zxf curl-7.17.1.tar.gz
(3)./configure –prefix=/usr/local/curl
(4)安装:make & make install
(5)重启apache服务器:sudo /etc/init.d/apache2 restart
3.PHP-mysqli
(1)进入目录:/usr/local/php/bin/phpize(路径或是php-5.2.14/ext/mysqli/phpize)
(2)运行命令:./configure --prefix=/usr/local/mysqli --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config
(3):安装:make make test make install
扩展以上模块都需要修改php.ini文件
(1)以上扩展模块都是.so文件,他们在 /usr/lib/php5/20121212/ 目录下 php.ini文件在 /etc/php5/apach2 目录下 我们需要手动修改php.ini
(2)修改phpini:查找 extension_dir 后面加上以下模块1.PHP-GD:extension_dir = "/usr/lib/php5/20121212/" extension=gd.so;
2.PHP-CURL:extension_dir = "/usr/lib/php5/20121212/" extension=curl.so;
3.PHP-mysqli:extension_dir = "/usr/lib/php5/20121212/" extension=mysqli.so;
(3)重启apache服务器:sudo /etc/init.d/apache2 restart