This question is asked by one of our forum user. I have set up LAMP in my Ubuntu operating system. I am using PHP version 5.3. I want to know how to install and enable curl in Ubuntu.
This is a common problem face by the beginners. To install curl library on your Ubuntu machine you need to installed and set up LAMP on your system first. After LAMP is installed successfully, install the curl library.
What is Curl ?
CURL is a tool to send and receive data,files. Best thing about curl is that, it supports almost all major protocols(DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP) in use.
One of the major use of curl is to get content,data from another websites by the application or api.
How to Install Curl on Ubuntu
Curl installation command.
1 |
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl |
How to Install,Remove,Update package through apt-get.
After successful installation of curl, restart the Apache webserver.
1 |
sudo service apache2 restart |
To check whether curl extension is successfully, installed. Run the following PHP script.
1 |
echo phpinfo(); |
If it installed successfully, then you can find the extension.