Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save BrunIF/f2ad27a17da8b3503c14a54dece3c6bc to your computer and use it in GitHub Desktop.

Select an option

Save BrunIF/f2ad27a17da8b3503c14a54dece3c6bc to your computer and use it in GitHub Desktop.
Install PHP EV, EVENT, LIBEVENT on Ubuntu 17.10 for PHP 7.1 (FPM, CLI)
Please use with caution, if you do not understand what these extensions are for, then document yourself first.
PHP LIBEVENT
WARNING: CAUSES SEGEMENTATION FAULT ON PHP 7.0 !
------------------------------------------
cd /usr/src/
git clone https://github.com/expressif/pecl-event-libevent.git
cd pecl-event-libevent
phpize
./configure
make && sudo make install
sudo echo 'extension=libevent.so' > /etc/php/7.1/mods-available/libevent.ini
sudo ln -s /etc/php/7.1/mods-available/libevent.ini /etc/php/7.1/fpm/conf.d/20-libevent.ini
sudo ln -s /etc/php/7.1/mods-available/libevent.ini /etc/php/7.1/cli/conf.d/20-libevent.ini
sudo service php7.1-fpm restart
------------------------------------------
PHP EVENT - RECOMMENDED!
------------------------------------------
pecl -d php_suffix=7.1 install event
sudo echo 'extension=event.so' > /etc/php/7.1/mods-available/event.ini
sudo ln -s /etc/php/7.1/mods-available/event.ini /etc/php/7.1/fpm/conf.d/20-event.ini
sudo ln -s /etc/php/7.1/mods-available/event.ini /etc/php/7.1/cli/conf.d/20-event.ini
sudo service php7.1-fpm restart
------------------------------------------
PHP EV - PHP DOES NOT SEE IT PROPERLY
------------------------------------------
pecl -d php_suffix=7.1 install ev
sudo echo 'extension=ev.so' > /etc/php/7.1/mods-available/ev.ini
sudo ln -s /etc/php/7.1/mods-available/ev.ini /etc/php/7.1/fpm/conf.d/20-ev.ini
sudo ln -s /etc/php/7.1/mods-available/ev.ini /etc/php/7.1/cli/conf.d/20-ev.ini
sudo service php7.1-fpm restart
------------------------------------------
Enjoy! ( give me a coffee? )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment