- 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
php -i|grep swoole