Centos7 安装 php-event 扩展

1、前置条件
yum install libevent -y
yum install libevent-devel -y
yum install php-devel php-pear -y

2、安装
pecl install event
注意提示:Include libevent OpenSSL support [yes] : 时输入no回车,
注意提示:PHP Namespace for all Event classes :时输入yes,其它直接敲回车就行

3、结果
Build process completed successfully
Installing '/usr/lib64/php/modules/event.so'
install ok: channel://pecl.php.net/event-3.0.8
configuration option "php_ini" is not set to php.ini location
You should add "extension=event.so" to php.ini

4、修改php.ini。 增加内容
extension=sockets.so
extension=event.so

你可能感兴趣的:(linux,运维,服务器)