Home >Backend Development >PHP Tutorial >Graphical tutorial on installing swoole under Windows (step-by-step explanation)
The following editor will bring you a graphic tutorial (php) on installing swoole under Windows. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor and take a look.
Specific steps to install swoole under Windows:
Swoole is not originally supported for installation under Windows. So we need to install Cygwin to use it. I encountered a lot of pitfalls when installing Cygwin, and the documentation on Baidu's experience is not very complete, so I wrote down my own installation of Cygwin and Swoole, which is equivalent to my own precipitation.
First prepare the tools:
Cygwin official address: http://www.cygwin.com/
swoole official Download address: https://github.com/swoole/swoole-src/releases
1. Download Swoole and Cygwin
Download Cygwin, mine is 64-bit
##1 Install Cygwin
Select the installed software package. Here you need to install gcc, PHP, php development tools, autoconf, pcre-devel, and other defaults. Note here that after searching in the search bar above, Find the corresponding software package below, select it, and click the Next button to start the installation. (Note: The screenshot below is the interface after I installed it. The click position is the same, but the icons behind it may be different) First search for gcc Then php and then pcre-devel##Finally autoconf
Finally, just go to the next step to install it.
2 Install SwooleExtract the source program of swoole to the Cygwin home directory and open the Cygwin software (Note: If your Cygwin is also installed on the C drive, then you have to pay attention. An error may be reported when installing swoole. The solution is to right-click and open Cygwin as administrator)
1 The environment at this time is like a Linux terminal, and the root directory is the Cygwin installation directory. Enter the command in the interface: cd /home/swoole-src, where swool-src is the decompressed source program
2 The environment at this time is like a Linux terminal, and the root directory is the Cygwin installation directory. Enter the command in the interface: cd /home/swoole-src, where swool-src is the decompression source. Program
3 Enter the command: phpize to generate the compiled configuration file configure
4 Enter the command: ./configure && make && make install
Configure, compile, compile and install swoole
(PS: execute ./configure, In addition to compiling the configuration, the environment will also be detected, etc.)
5Use the command: php -i | grep php.ini, find the path to the configuration file php.ini used by php cli, modify the php.ini file, and Add a line to the file: extension=swoole.so, then close and exit
6 /extension search press n to search again
7 Add extension=swoole.so
8 :wq Save and exit
9 Use command: php -m to view the loaded module. If you see to swoole, the extension is added successfully, and the environment is successfully built!
The above is the detailed content of Graphical tutorial on installing swoole under Windows (step-by-step explanation). For more information, please follow other related articles on the PHP Chinese website!