1. Download Cygwin to Cygwin website.
Website address: https://www.cygwin.com/
2. Open the downloaded Cygwin installation package and start installing the Cygwin.
Select the installation directory for Cygwin (this will also be the Swoole installation directory):
Select where to store the package download:
Choose:
Select gcc file package Download:
Select PHP file package to download:
Select autoconf Package Download:
After selecting all the packages that need to be downloaded, click "Next" to start the download.
Download speed here will be slow, it will take a long time, and often interrupted, sometimes need to re-select ... I don't know what to say except to persist and keep trying. )
3. Download Swoole Source code:
: https://github.com/swoole/swoole-src/releases
4. Extract the downloaded Swoole source code to the home subdirectory in the Cygwin installation directory.
5. Open the installed Cygwin and go to the Swoole source code directory and execute the following commands, respectively:
(1) Phpize
(2)./configure (Compile configuration detection, etc.)
(3) make (compile)
An error occurred during the first compilation:
Online search data found the answer to Rango:
Then reopen the Cygwin installation package, search for Pcre-dev, select a package to download.
And then recompile, no errors, but there are several warnings, directly ignored!
(4) make install (Install swoole extension)
(5) using the Php-i|grep php.ini command to find the location of the php.ini configuration file, add the configuration of the swoole extension at the end of the file:
6. Start the Swoole service: In the Cygwin interface, enter the HTTP directory in the example directory in the Swoole installation directory,
Enter the command:
PHP server.php
(Of course there should be server.php this file in this directory)
7. Access http://127.0.0.1:9501/in the browser address bar, the printing information indicates that the Swoole installation is successful and can be
To use it!
This process is very tortuous, you need to keep trying, think, as long as you stick to the success of the moment, you can use Swoole!!!
Compiled installation deployment for Swoole extensions under Windows