zoukankan      html  css  js  c++  java
  • php7 安装event扩展

    1.安装libevent

      // libevent 是一个库,event扩展依赖这个库并实现其功能!其实有php-libevent扩展,但是不知道什么原因,并不支持php7

      下载最新稳定版:wget -c https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz

      解压:tar -zxvf libevent-2.1.8-stable.tar.gz

      进入目录,配置一下安装目录,然后安装

      cd libevent-2.1.8

      ./configure --prefix=/usr/local/libevent

      make && make install

    2.安装sockets扩展

      // 如果没有安装这个扩展,生成event扩展的时候会提示你缺少socket扩展

      我之前有安装过pcntl扩展,一模一样,这里不再赘述:https://www.cnblogs.com/milkone/p/9982051.html

    3.安装event扩展

       下载文件:wget -c http://pecl.php.net/get/event-2.3.0.tgz

       解压:tar -zxvf event-2.3.0.tar.tgz

      进入目录 :cd  event-2.3.0.tar

      运行phpize: /usr/local/php7/bin/phpize

      配置 :./configure --with-php-config=/usr/local/php7/bin/php-config --with-event-libevent-dir=/usr/local/libevent/

      安装:make && make install

      配置文件添加扩展:echo extension = event.so >> /usr/local/php7/etc/php.ini

      查看是否安装完成:php -m

    4.其他说明

      根据php官方文档,event依赖libevent和openssl,openssl 一般在安装php7的时候就需要安装,这里不再重复安装了

  • 相关阅读:
    【Rust】文件操作
    【Rust】转义字符
    【Rust】原始标识符
    【Rust】字节数组
    【Rust】文档测试
    【Rust】外部函数接口
    【Rust】不安全操作
    【Rust】单元测试
    【Rust】集成测试
    WPF之ComboBox 安静点
  • 原文地址:https://www.cnblogs.com/milkone/p/9995046.html
Copyright © 2011-2022 走看看