时间:2021-07-01 10:21:17 帮助过:45人阅读
下载地址:http://pecl.php.com/package/event
安装支持库libevent,需要编译高版本(这里以最新版本release-2.1.8-stable为例)
wget -c https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz -P /usr/local/src cd /usr/local/src tar -zxvf libevent-2.1.8-stable.tar.gz && cd libevent-2.1.8-stable ./configure --prefix=/usr/local/libevent-2.1.8 make && make install
安装event库(以event-2.3.0.tgz为例)
wget -c http://pecl.php.com/get/event-2.3.0.tgz -P /usr/local/src cd /usr/local/src tar -zxvf event-2.3.0.tgz && cd event-2.3.0 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.1.8/ make && make install
在php.ini添加下面配置
extension=event.so
重启php-fpm后,使用php -m | grep event 查看event库插件是否安装成功
相信看了本文案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!
推荐阅读:
PHP+RSA生成密钥位数为1024位步骤详解
PHP开发api接口安全验证步骤详解
以上就是php7内安装event扩展步骤详解的详细内容,更多请关注Gxl网其它相关文章!