Libevent is an event-driven, high-performance network library.
Supports multiple I/O multiplexing Technologies, Epoll, poll, Dev/poll, select, and Kqueue, support for events such as I/O, timers and Signals, and register event priorities.
Effectively arranging I/O, time and signal expansion using events that are available for the best I/O notification mechanism for a particular platform, is the libevent port of the PHP infrastructure.
The libevent extension relies on the original Libevent library, and the Libevent library must be installed first.
Libevent Project on GitHub Project address: https://github.com/nmathewson/Libevent
Download Libevent Source code
# git clone # cd libevent#./configure--prefix=/usr/local/libevent-2.1.8 # make && make install
Install the event library (take event-2.3.0.tgz as an example) (in addition, PHP must turn on the sockets function, when compiling PHP to turn on --enable-sockets)
# wget # tar XF event-2.3.0.tgz# cd event-2.3.0# phpize#./configure--with-php-config=/usr/local/php/bin/php-config--wi th-event-libevent-dir=/usr/local/libevent-2.1.8/# make && make install
Locate the PHP configuration file php.ini, and add the following configuration:
Extension=event.so
OK, installation complete, execute Php-i | Grep-i event to see if there are relevant module information.
For the PHP-FPM service, restart the service to load the new environment.
Related development help documents see: Http://php.net/manual/zh/book.libevent.php
This article is from the "Professor" blog, please be sure to keep this source http://professor.blog.51cto.com/996189/1918673
PHP 7 Compile and install open Libevent extension support