发布时间:2020/04/26 作者:天马行空 阅读(3144)
1、安装依赖,都安装上就好
yum install gettext gettext-devel libXft libXft-devel libXpm libXpm-devel automake autoconf libXtst-devel gtk+-devel gcc zlib-devel libpng-devel gtk2-devel glib-devel
2、安装curl安装包,下载地址:https://curl.haxx.se/download.html
tar zxvf curl-7.39.0.tar.gz cd curl-7.39.0 ./configure --prefix=/usr/local/curl make && make install
3、安装php扩展
cd /home/php-5.4.17/ext/curl/ /home/wwwroot/php/bin/phpize ./configure --with-php-config=/home/wwwroot/php/bin/php-config --with-curl=/usr/local/curl make && make install
4、php.ini 中加入 extension=curl.so
/etc/init.d/php-fpm restart