pcre2, in Searchthe search pcre2, expand Text, locate the blue selected items in the figure below, in the Newcolumn, you can double-click selection
libpcre2-devel, in Searchthe search libpcre2-devel, expand Libs, locate the blue selected items in the figure below, in the Newcolumn, you can double-click selection
In the last step, select all the software packages, click Next, until the installation is completed, the time may be a bit long, wait patiently
>Compile and install Swoole, unzip it and put it in the home directory
The above extract the downloaded Swoolecompressed, placed cygwinin the installation directory homedirectory, for convenience, and renamed Swoole, of course, can not change
The above extract the downloaded Swoolecompressed, placed cygwinin the installation directory homedirectory, for convenience, and renamed Swoole, of course, can not change
Open cygwin and enter the Swoole directory
Double-click to run Cygwin software, then the command cd /home/swool/, enter the Swooledecompression of the source code
Double-click to run Cygwin software, then the command cd /home/swool/, enter the Swooledecompression of the source code
Generate compiled configuration file
In Swoolethe root directory, execute the command phpize, the compiler can generate configuration files configure
In Swoolethe root directory, execute the command phpize, the compiler can generate configuration files configure
Compile the configuration and detect the environment and compile and install
After generating a compiled file configuration above, and then enter a command ./configure && make && make install, and waits for that compiler installation Swoolecomplete
After generating a compiled file configuration above, and then enter a command ./configure && make && make install, and waits for that compiler installation Swoolecomplete
> Check whether the Swoole installation is successful and see if the Swoole extension is enabled
After installation is complete, we enter the command php --ini, you can find php.inithe directory location of the configuration file can be found in the directory configuration file /etc/php.ini, and then through the viEdit View command vi /etc/php.ini, and into the last line of the file, and then found that his party has been extension=swoole.dllextended configuration This is because this module has already been compiled in when it is compiled and installed php.
After installation is complete, we enter the command php --ini, you can find php.inithe directory location of the configuration file can be found in the directory configuration file /etc/php.ini, and then through the viEdit View command vi /etc/php.ini, and into the last line of the file, and then found that his party has been extension=swoole.dllextended configuration This is because this module has already been compiled in when it is compiled and installed php.
Then we command php -mto see whether you really have this extension of it can be found from the figure has indeed been swooleextended
Test the Swoole environment selection and enter the test directory
We downloaded Swoolethe source code, there are many examples, we can run tests directly, go to examplesthe directory, which are all sample code, we chose http/server.phpto test, then cd http/enter the httpdirectory
We downloaded Swoolethe source code, there are many examples, we can run tests directly, go to examplesthe directory, which are all sample code, we chose http/server.phpto test, then cd http/enter the httpdirectory