php安装event扩展
315
2020-06-14 21:49:13
1、下载libevent文件
2、解压文件tar -zxvf libevent-2.1.11-stable.tar.gz
3、然后 进入目录安装./configure --prefix=/usr/local/libevent
make && make install
4、看看自己有没有sokects扩展,没有的话自己安装,一般都会有的php -m
5、下载event扩展,下载、解压、进目录wget http://pecl.php.net/get/event-2.5.6.tgz
tar -zxvf event-2.5.6.tgz
cd event-2.5.6
6、用phpize安装/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent/
make && make install
7、在php.ini里面加入扩展echo extension = event.so >> /usr/local/php/etc/php.ini
8、重启php查看扩展安装完成
版权声明:本文为博主原创文章,未经博主允许不得转载。