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 php extension Module in centos

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to install the php extension module in centos. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Centos installs the php expansion module: 1. Install pecl;2, install libevent-devel;3, and execute the command [echo extension=libevent.so > / etc/php.d/libevent.ini].

This article operating environment: centos7 system, php 7.3, thinkpad T480 computer.

In a centos system, we can generally install the extension module in two ways, one is the yum command, and the other is phpize. Next, let's introduce these two methods and take a look at them together.

1. Yum command

If you previously installed php using the yum command, congratulations that you can install the php extension in the same way. The specific steps are as follows:

Tip: please install pecl before executing the following command. If you have not already installed it, please install it as follows:

/ / Open the corresponding installation version directory cd / usr/local/php/bin/ curl download curl-o go-pear.php http://pear.php.net/go-pear.phar// install php go-pear.php

All right, start installing the php extension:

1. Yum install libevent-devel2, pecl install channel://pecl.php.net/libevent-0.1.03, echo extension=libevent.so > / etc/php.d/libevent.ini

II. Phpize

This approach may be cumbersome to operate, and you should be patient when installing. Let's take a look at the specific installation steps:

/ / download the libevent extension file archive ~ # wget http://pecl.php.net/get/libevent-0.1.0.tgz / / decompress ~ # tar-zxvf libevent-0.1.0.tgz / / enter the source directory ~ # cd libevent-0.1.0/ run the phpize command, and write the full phpize path ~ # / usr/local/php/bin/phpize / / run the configure command When configuring, attach the path of php-config to ~ #. / configure-- with-php-config=/usr/local/php/bin/php-config / / run the make command ~ # make / / Test compilation installation ~ # make test / / formal compilation installation ~ # sudo make install / / modify php.ini Add at the end: extension=libevent.so / / restart the corresponding php-fpm about "centos how to install the php extension module" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

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

Development

Wechat

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

12
Report