一、安裝bcmath
安裝 bcmath
ubuntu16.0.4 的php7.0安裝:
apt install php7.0-bcmath
apt-get update
apt install php7.0-bcmath
php7.1安裝:
add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-bcmath
二、安裝swoole
wget -c http://pecl.php.net/get/swoole-4.2.1.tgz
tar xzvf swoole-4.2.1.tgz
cd swoole-4.2.1
/usr/bin/phpize
./configure --with-php-config=/usr/bin/php-config
make && make install
vi /etc/php/7.1/fpm/php.ini
vi/etc/php/7.1/cli/php.ini
加入swoole.so
extension=swoole.so
重啓
service php7.1-fpm restart