Home  >  Article  >  Topics  >  Record of manual installation of Swoole in Pagoda panel environment

Record of manual installation of Swoole in Pagoda panel environment

藏色散人
藏色散人forward
2019-09-26 09:58:184580browse

The following column Pagoda Panel Tutorial will introduce to you how to manually install Swoole in the Pagoda Panel environment. I hope it will be helpful to friends in need!

Record of manual installation of Swoole in Pagoda panel environment

Due to business needs and management convenience, we use the Pagoda panel as the Web management end for existing projects and need to use Swoole Redis as the WebSocket service.

Because there is a click to install Swoole in the Pagoda panel, but Pagoda uses the Pecl installation method, so Swoole's AsyncIO extension cannot be manually expanded.

The installation process is recorded below:

First download the asynchronous Redis client we need

hiredis download address:

https://github. com/redis/hiredis/releases

Download and decompress and execute:

make -j
sudo make install
sudo ldconfig

Then download the Swoole source package for compilation, and it should be noted that the version of gcc is greater than 4.4

https ://github.com/swoole/swoole-src/releases

http://pecl.php.net/package/swoole

https://gitee.com/swoole/swoole

After decompression, enter the directory and execute

phpize
./configure --enable-async-redis --with-php-config=/www/server/php/71/bin/php-config
make clean
make -j
sudo make install

What you need to pay attention to here:

./configure adds two necessary parameters, the first one--enable-async- redis is the extension of redis that I need to use

The second --with-php-config specifies the path of php-config, otherwise it will not be compiled

All Pagoda installations The software is all in the /www/server/ directory

Ok! In this way, the installation can be completed smoothly

Finally, don’t forget to add extension=swoole.so in the php.ini file

In order to verify whether the installation is successful

Execute php - -ri swoole can

The above is the detailed content of Record of manual installation of Swoole in Pagoda panel environment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete