Write by lyc at 2020-6-11

php7.3安装扩展:swoole

1.安装

swoole 扩展下载

1
2
3
4
5
6
7
$ cd /usr/local/src
$ wget https://pecl.php.net/get/swoole-4.4.19.tgz
$ tar zxf swoole-4.4.19.tgz
$ cd swoole-4.4.19
$ /usr/local/php/bin/phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make && make install

2.include

1
2
3
4
5
$ cat >> /usr/local/php/etc/php.ini << EOF
[swoole]
extension=swoole
swoole.use_shortname=On
EOF

3.php-fpm 重启

1
$ systemctl restart php-fpm

4.验证

1
2
$ /usr/local/php/bin/php -m | grep swoole
swoole