Centos7 Installing the PHP swoole extension

Source: Internet
Author: User

PHP's asynchronous, parallel, high-performance network communication engine, written in pure C, provides the PHP language for asynchronous multithreaded servers, asynchronous TCP/UDP network clients, asynchronous MySQL, asynchronous Redis, database connection pooling, Asynctask, Message Queuing, millisecond timers, Asynchronous file read-write, asynchronous DNS query. The Swoole has built-in Http/websocket server-side/client, Http2.0 server-side/client.

The Swoole has a built-in asynchronous non-blocking, multi-threaded network IO server. PHP programmers only need to deal with event callbacks, without having to worry about the underlying. NginxUnlike the Tornado Node.js All-Asynchronous framework, Swoole supports both full-async and synchronous.

In addition to the asynchronous IO support, Swoole has designed multiple concurrent data structures and IPC communication mechanisms for PHP multi-process mode, which can greatly simplify the work of multi-process concurrent programming. These include the rich features of concurrent atomic counters, concurrent Hashtable,channel,lock, interprocess communication IPC, etc.

Swoole supports the built-in coprocessor starting with version 2.0, which enables asynchronous programs to be implemented using fully synchronized code. PHP code does not need to add any additional keywords, the underlying automatic scheduling, asynchronous implementation.

Swoole can be widely used in the Internet, mobile communications, enterprise software, online games, Internet of things, car networking, smart home and other fields. Use PHP+Swoole as a network communication framework, can make enterprise IT research and development team's efficiency greatly improve, more focus on the development of innovative products.

Swoole is free free software for open source, the license agreement is Apache2.0 . Enterprise and individual developers are free to use Swoole code, and modifications made on the swoole can be used for commercial products without open source (note: The original author's copyright notice must be retained)

Installation steps:

1.wget https://github.com/swoole/swoole-src/archive/swoole-1.7.6-stable.tar.gz

2.tar ZXVF swoole-1.7.6-stable.tar.gz

3.CD swoole-1.7.6-stable.tar.gz

4.phpize (Final execution success is shown below)

5../configure (the final execution succeeds as shown below)

6.make && make install (Final execution success is shown below)

Finally, modify the php.ini file input extension=swoole.so

Finally restart Nginx and PHP

Service Nginx Restart

Service PHP-FPM Restart

Centos7 Installing the PHP swoole extension

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.