We log in with the privileges of the root user and execute the following commands:
yum install curl php-curl
Installation from the Author's website, this installation is very convenient when we have (curl error 7: failed connect connection timed out).
First we install the download manager (wget), which will allow us to download the package (curl-7.57.0.tar.gz).
yum install wget
We download the installation package:
cd /tmp
wget https://curl.haxx.se/download/curl-7.57.0.tar.gz
tar -xvf curl-7.57.0.tar.gz
cd curl-7.57.0
CentOS 7 is already installed with a C compiler. Run the following commands to compile the Source code.
./configure
make
make install
We restart apache with the following command:
systemctl restart httpd
We check the curl installation
curl -V
ccurl 7.57.0 (x86_64-pc-linux-gnu) libcurl/7.57.0 OpenSSL/1.0.2k zlib/1.2.7
Release-Date: 2017-11-29
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets HTTPS-proxy