FreeABC
记忆重叠

php7下安装event扩展

Event是什么

This is an extension to efficiently schedule I/O, time and signal based events using the best I/O notification mechanism available for specific platform. This is a port of libevent to the PHP infrastructure

1:首先安装支持库libevent,不能用yum,要自己编译高版本的

wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -zxvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local/libevent-2.0.22
make
make install

 

2:编译扩展

wget https://pecl.php.net/get/event-2.0.4.tgz
tar -zxvf event-2.0.4.tgz
cd event-2.0.4
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.0.22/
make
make install

 

3:修改php.ini增加event.so文件即可

未经允许不得转载:Free-Abc智能 » php7下安装event扩展
分享到: 更多 (0)