Install swoole in Windows (php) and swoolephp

Source: Internet
Author: User

Install swoole in Windows (php) and swoolephp

To install swoole in Windows, follow these steps:

Swoole, originally not supported in Windows, so we need to install Cygwin for use. I encountered a lot of pitfalls when installing Cygwin, and the documents on Baidu experience were not very comprehensive. So I wrote down Cygwin and Swoole on my own, which is equivalent to accumulating my own resources.

First, prepare the tool:

Cygwin official address: http://www.cygwin.com/

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

I. Download Swoole and Cygwin

 

Download Cygwin, Which is 64-bit

2. Install Cygwin

 

Select the software package to be installed. Install gcc, PHP, php development tools, autoconf, and pcre-devel. By default, note that after searching in the search box above, select the corresponding software package and click Next to start installation. (Note: The following figure shows the UI after I install it. The position is the same, and the icon on the back may be different)

Search for gcc first

Then php

Where pcre-devel

 

Finally, autoconf

 

The next step is the installation.

 

 

2. Install Swoole and decompress the swoole source program to the Home Directory of Cygwin. Open the Cygwin software (Note: if your Cygwin is also installed on the C drive, you must pay attention to it, when swoole is installed, an error may be reported. The solution is to right-click Cygwin as the administrator. 1. The environment is like a linux terminal, and the root directory is the installation directory of Cygwin, enter the command cd/home/swoole-src on the interface. swool-src is the decompressed source program. 2. The environment is like a linux terminal, and the root directory is the installation directory of Cygwin, enter the command cd/home/swoole-src on the interface. swool-src is the decompressed source program. 3. Enter the command phpize to generate the compiled configuration file configure4. Enter the command :. /configure & make install

Configure, compile, compile, and install swoole

(PS: Execute./configure. In addition to compiling configurations, it also checks the environment and so on)

 

5. Run the following command: php-I | grep php. ini, find the configuration file php. ini path, modify php. INI file, add a line in the file: extension = swoole. so, and then close and exit

 

6. Search extension by n.

 

7 add extension = swoole. so

 

8: wq save and exit

 

9 run the php-m command to check the loaded modules. If swoole is displayed, the extension is added successfully and the environment is successfully established!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.