Skip to content

Instantly share code, notes, and snippets.

@danyelkeddah
Created June 13, 2021 05:18
Show Gist options
  • Save danyelkeddah/e15a8c5bef633ce9ab0a60935f5f20ed to your computer and use it in GitHub Desktop.
Save danyelkeddah/e15a8c5bef633ce9ab0a60935f5f20ed to your computer and use it in GitHub Desktop.
install ev and event
sudo apt-get install libevent-dev
sudo pecl install ev
sudo pecl install event
# Create configurations
sudo echo 'extension=ev.so' > /etc/php/8.0/mods-available/ev.ini
sudo echo 'extension=event.so' > /etc/php/8.0/mods-available/event.ini
sudo ln -s /etc/php/8.0/mods-available/ev.ini /etc/php/8.0/fpm/conf.d/20-ev.ini
sudo ln -s /etc/php/8.0/mods-available/ev.ini /etc/php/8.0/cli/conf.d/20-ev.ini
sudo ln -s /etc/php/8.0/mods-available/event.ini /etc/php/8.0/fpm/conf.d/20-event.ini
sudo ln -s /etc/php/8.0/mods-available/event.ini /etc/php/8.0/cli/conf.d/20-event.ini
sudo service php8.0-fpm restart
# NOTE:
# event.ini and ev.ini should be loaded after sockets.ini
# sobasically xx-event.ini and xx-ev.ini (xx => number should be greater than xx-socket.ini)
# normally .ini are located at
# - /etc/php/8.0/fpm/conf.d
# - /etc/php/8.0/cli/conf.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment