วิธีติดตั้ง+อัพเดท curl และ php-curl บน Linux (Ubuntu17, Debian9.3, Centos7, Fedora 27) ขึ้นไป

Curl is a free and open source data transfer tool used for transfer of data to and from a server using the following supported protocols: IMAP, IMAPS, POP, POP3, POP3S, DICT, FILE HTTP, HTTPS, SMB, SMBS, SMTP, SMTPS, FTP, FTPS, TELNET, RTSP, RMTP and TFTP.

During its normal operation, it displays a meter-like progress bar indicating parameters such as data transfer speed, amount of data transferred, and estimated time left. The speed is indicated in bytes per second. Let’s see how we can install curl and php-curl in various Linux distributions.

Ubuntu 18.04, 17.10 and Debian 9.3

Login as root and update your Ubuntu system first

Install curl

Install php-curl

PHP 7.0

PHP 5.6

PHP 5.5

Verify curl is installed and check its version

dpkg -l curl

From source

Visit curl’s website and download the latest curl version by copying the link and using wget command

Uncompress the tarball file using the tar command below

Navigate to the uncompressed folder

You’ll require the C compiler to build the source code. Install the C compiler as shown below.

Run the commands below in succession to compile the source code

Centos 7

Login as  root and run

Installing php-curl

From source

Just like we did in Ubuntu 17.10, navigate to curl’s website and download the curl tarball.

Uncompress the tarball

Navigate to the uncompressed folder

Centos 7 comes already installed with a C compiler. Run the commands below to compile the source code

ถ้า compile error

แล้วต่อด้วย

Verify installation of curl

curl --version centos 7

UPDATE

Download and install it

Fedora 27

NOTE Fedora 27 comes pre-installed with curl.

To install php-curl simply log in as root and run

Verify installation of curl

php-curl fedora

Arch 2017 Linux

First, log in as root and update the system

Install curl

Verify whether curl in installed

Alpine Linux 3.7

Run apk add curl

alpine-curl

Verify installation of Curl

apk-search curl

Curl is the backbone of internet data transfer for thousands of software applications using a myriad of protocols. Being free and open source has enabled many contributors to work on the curl project and continually come up with newer and improved versions.

Leave a Reply

iameveme