Skip to content

Instantly share code, notes, and snippets.

@yus-ham
Last active May 22, 2020 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yus-ham/335ec60391f4eaddad76fcb4cdcc464f to your computer and use it in GitHub Desktop.
Save yus-ham/335ec60391f4eaddad76fcb4cdcc464f to your computer and use it in GitHub Desktop.
  1. Install from source (recommended)

Please download the source packages from Releases or:

git clone https://github.com/swoole/swoole-src.git
cd swoole-src
git pull
git checkout v4.x.x -f

Compile and install at the source folder:

phpize clean
phpize
./configure --enable-openssl --enable-sockets --enable-http2 --enable-mysqlnd
make clean
make
sudo make install

Enable extension in PHP

After compiling and installing to the system successfully, you have to add a new line extension=swoole.so to php.ini to enable Swoole extension.

View Releases install swoole_async:

git clone https://github.com/swoole/async-ext.git
cd async-src
git pull
git checkout v4.x.x

phpize
./configure
make clean
make -j 4
sudo make install

check

php -i|grep swoole

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment