search
HomePHP FrameworkSwooleHow to install swoole

How to install swoole

Dec 10, 2019 pm 01:43 PM
swoole

How to install swoole

##Method 1: PECL installation

Install dependency packages

apt-get install libpcre3 libpcre3-dev

Install swoole

pecl install swoole

Modify PHP configuration php.ini Load swoole

Verify installation and loading:

php -m | grep swoole

Method 2: Source code compilation and installation

1. Download swoole

Download the source code package, decompress it, and switch to the decompression directory

wget -c https://github.com/swoole/swoole-src/archive/v2.0.6.tar.gz

Decompression: tar -zxvf v2.0.6.tar.gz

cd swoole- src-2.0.6/

2. Compile and install

Use phpize to generate PHP compilation configuration

.configure for compilation configuration detection

make Compile make install and install

Execute command:

phpize

./configure

make

make install

Under normal circumstances, it will appear

Installing shared extensions: /usr/lib64/php/modules

Indicates that the swoole.so file is generated in the above directory/usr/lib64/php/modules

3. 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 command

vim swoole.ini

In swoole.ini Enter

;Enable swoole extension module

extension=swoole.so

Save.

Recommended learning:

swoole video tutorial

The above is the detailed content of How to install swoole. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

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

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

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

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft