linux现有PHP配置下增加配置curl模块
进入资源目录,下载curl模块,并安装
#cd /usr/local/src
#wget http://curl.haxx.se/download/curl-7.18.2.tar.gz
#tar -zxvf curl-7.18.2.tar.gz
#cd curl-7.18.2.tar.gz
#./configure --prefix=/usr/local/curl#make
#make install
(进入php的源码目录)
#cd /usr/local/src/php-5.2.1
#cd ./ext/curl
#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/local/curl#make
复制modules/curl.so到php的扩展目录下
#cp modules/curl.so /usr/local/php/lib/extensions
#vim /usr/local/php/etc/php.ini
修改php.ini文件,加入: extension=curl.so
修改extension_dir = "/usr/local/php/lib/extensions"
重启apache服务
#service httpd restart
这时看phpinfo, curl模块已经加载。