Centos7源码安装PHP7.4.3
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-mbstring --enable-mysqlnd
make
make install
step4:查看php版本,,并做软链接
php -v
ln -s /usr/local/php/bin/php /usr/sbin/php
step5:把解压路径里的php.ini-production拷贝到/usr/local/php/etc/php.ini
cp /opt/php-7.4.3/php.ini-production
/usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
step6:将php-fpm作为系统服务
cd /usr/local/php/sbin
cp php-fpm /etc/init.d/php-fpm
启动服务:/etc/init.d/php-fpm