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

Installation and configuration of swoole extension in linux system

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

Share

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

Swoole is a PHP asynchronous network communication engine for production environment, which enables PHP developers to write high-performance asynchronous and concurrent TCP, UDP, Unix Socket, HTTP,WebSocket services. Swoole can be widely used in Internet, mobile communications, enterprise software, cloud computing, online games, Internet of things (IOT), car Internet, smart home and other fields. Using PHP + Swoole as the network communication framework can greatly improve the efficiency of the enterprise IT R & D team.

I. basic operating environment

Ensure that the PHP version is greater than or equal to 7.1

Make sure that the Swoole extension is greater than or equal to 1.9.23 or 2.1.0. Currently, the latest version is 4.2.6.

Any version that requires an extension of pcntl

Using Composer as a dependency management tool

Linux environment CentOS 6.5 or later operating system

Second, download

1. Download cd / usr/local/src/

Wget http://pecl.php.net/get/swoole-4.2.6.tgz

two。 Decompress tar xvf swoole-4.2.6.tgz

Cd swoole-4.2.6

3. Compile / usr/local/php7/bin/phpize this is the phpize location of my php

. / configure-- with-php-config=/usr/local/php7/bin/php-config (this is my configuration)

Echo $? See if the last step was carried out successfully.

Then make & & make install

Add extension

Vim / usr/local/php7/etc/php.iniextension = / usr/local/php7/lib/php/extensions/no-debug-non-zts-20170718/swoole.so

View phpinfo ()

These are the details of how to install swoole in linux system. Please pay attention to other related articles for more information.

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