Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install curl extension in Linux

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to install the curl extension in Linux, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

Environment:

Linux:CentOs 6.4

PHP:5.6.30

Solution:

1. Enter the PHP source directory, which is the address where you downloaded PHP to the server and decompressed it.

Cd / usr/local/src/php-5.6.30

2. Perform ext/curl under the PHP source directory

Cd ext/curl

3. Call the phpize program to generate the compiled configuration file

/ usr/local/php/bin/phpize

4. Call configure to generate Makefile file

. / configure-with-curl=/usr/local/curl-with-php-config=/usr/local/php/bin/php-config

5. Compile and install

Make & make install

You will be prompted to generate the path to the file curl.so:

/ usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

6. Modify php.ini file

Vim / usr/local/php/lib/php.iniextension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/curl.so

7. Detection

/ usr/local/php/bin/php-m

If you see a curl entry, the installation is successful.

8. Restart php-fpm

Pkill-9 php-fpm./sbin/php-fpm above is how to install curl extensions in Linux. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report