Home > Article > Operation and Maintenance > Install php curl extension under linux
1. Install curl
The first choice is to install curl. The steps are as follows:
cd /usr/local wget http://curl.haxx.se/download/curl-7.44.0.tar.gz tar zxf curl-7.44.0.tar.gz mv curl-7.44.0.tar.gz curl cd curl ./configure make make install
(Recommended video tutorial: linux video tutorial)
2. Install PHP curl extension
Go to ext/curl in the PHP installation directory and execute the following command:
cd /usr/local/php/ext/curl phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/local/curl make make install
3. Modify php .ini file, enable curl expansion
vim /usr/local/php/lib/php.ini # 找到 ;extension=shmop 下面(获取其他拓展下面都行)添加下面一行: extension=curl.so
4. Restart php-fpm
Recommended tutorial: linux tutorial
The above is the detailed content of Install php curl extension under linux. For more information, please follow other related articles on the PHP Chinese website!