PHP7 steps to install the Swoole extension

Source: Internet
Author: User
yesterday, I accidentally saw a video tutorial on live

In the Swoole, I believe that everyone (nearly 1 years phper) has heard it, but not really to use it, of course, do not know how to use (Me too).

Summarize here (draw on a few online technical stickers)PHP7 How to install the swoole extension.

My environment

CentOS Linux release 7.3.1611 (Core) PHP 7.0.22 (CLI) (Built:aug  9 18:23:24) (NTS) MySQL  Ver 15.1 distrib 5. 5.52-MARIADB, for Linux (x86_64) using ReadLine 5.1nginx version:nginx/1.10.2


Installation steps

1.

Wget-c https://github.com/swoole/swoole-src/archive/v2.0.8.tar.gz//Current Latest version 2.0.8

2.TAR-ZXVF v2.0.8.tar.gz//unzip then CD into the compressed directory

3. This time you need to use Phpize to generate the compilation file (here is attached http://www.cnblogs.com/hubing/p/4941692.html to phpize explanation is very clear) {

The role of phpize can be understood as follows: the detection environment (Phpize tool is in the PHP installation directory, based on this phpize corresponding to the PHP environment at the time, so it is based on the configuration of the PHP to generate the corresponding configure file), the establishment of a configure file. You must run Phpize in a directory. Then phpize know which directory your environment is, and configure files are built into that directory.

}

At this time I am wrong to protect the following:

Can ' t find PHP headers in/usr/include/php The Php-devel package are required for use with this command.

Workaround:

Yum Install Php70w-devel

4. Execute phpize/usr/bin/phpize (remember to execute in the swoole extension directory)

5. Execution./configure

6. Then the make && make install goes through

7. Finally, to modify the next php.ini add extension=swoole.so

8. Remember to restart the service

Ok! At this point, the execution of Php-m can see more than one swoole to show success.

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.