建议先关闭php,systemctl stop php-fpm
1:找到php的bin目录,我的是 /usr/local/php720/bin
find -name bin
2:去到bin目录
cd /usr/local/php720/bin
3:查看安装时的configure,如图
./php -i|grep "configure"
4:查看php源代码的 configure文件,我的是 /soft/php-7.2.0/configure
cd /
find -name configure
5:去到/soft/php-7.2.0目录
cd /soft/php-7.2.0
6:运行第三步打印出来的东西,从'./configure'开始一直到结尾
7:执行
make && make install
8:重启php
service php-fpm restart
或者
systemctl restart php-fpm