##Method 1: PECL installation
Install dependency packagesapt-get install libpcre3 libpcre3-devInstall swoole
pecl install swooleModify PHP configuration php.ini Load swooleVerify installation and loading:
php -m | grep swoole
Method 2: Source code compilation and installation
1. Download swooleDownload the source code package, decompress it, and switch to the decompression directorywget -c https://github.com/swoole/swoole-src/archive/v2.0.6.tar.gzDecompression: tar -zxvf v2.0.6.tar.gzcd swoole- src-2.0.6/2. Compile and installUse phpize to generate PHP compilation configuration.configure for compilation configuration detectionmake Compile make install and installExecute command:phpize./configuremake make installUnder normal circumstances, it will appearInstalling shared extensions: /usr/lib64/php/modulesIndicates that the swoole.so file is generated in the above directory/usr/lib64/php/modules3. Modify the configuration file and load the module Add the swoole module to the PHP configuration file php.ini. Note that the PHP7 module configuration file is separate and only needs to be in /etc/php. Add the module configuration file swoole.ini to the d/ directory to Enter /etc/php.d/ and execute the commandvim swoole.ini In swoole.ini Enter ;Enable swoole extension module extension=swoole.soSave.Recommended learning:
The above is the detailed content of How to install swoole. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
