安装php7.4 参考
https://www.mf8.biz/ubuntu-debian-install-php7-3/
我安装的包:
apt-get install php7.4-mbstring php7.4-bz2 php7.4-bcmath php7.4-soap php7.4-gd php7.4-mysql php7.4-xmlrpc php7.4-dev php7.4-curl php7.4-xml php7.4-xsl php7.4-zip php7.4-fpm php7.4-gmp php7.4-cli php7.4-opcache
安装swoole
参考
https://www.jianshu.com/p/462013f18177
下载swoole-4.6.4.tgz
tar -zxvf 解压
./configure --with-php-config=/usr/bin/php-config7.4
sudo make
sudo make install
cd /etc/php/7.4/
cd mods-available/
cp zip.ini swoole.ini
sudo vim swoole.ini
cd ..
cd cli/
sudo ln -s /etc/php/7.4/mods-available/swoole.ini 30-swoole.ini
php7.4 -m