Home > Operation and Maintenance > Linux Operation and Maintenance > Install php curl extension under linux

Install php curl extension under linux

王林
Release: 2020-04-25 10:51:04
Original
3194 people have browsed it

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
Copy after login

(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
Copy after login

3. Modify php .ini file, enable curl expansion

vim /usr/local/php/lib/php.ini
# 找到 ;extension=shmop 下面(获取其他拓展下面都行)添加下面一行:
extension=curl.so
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template