PHP7.3安装event扩展

安装支持库libevent

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

安装event库

可以在http://pecl.php.net/package/event 查看最新的稳定版本,我这里安装的是2.5.3

cd /home
wget http://pecl.php.net/get/event-2.5.3.tgz
tar -zxvf event-2.5.3.tgz
cd event-2.5.3
/www/server/php/72/bin/phpize
./configure --with-php-config=/usr/local/src/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.1.11
make && make install

配置php.ini

打开php.ini,在里面添加:

extension=event.so

##通过命令查看

php --ri event

你可能感兴趣的:(PHP7.3安装event扩展)