安装php
参考:https://www.cnblogs.com/edward2013/p/5020933.html
wget http://cn2.php.net/distributions/php-7.3.23.0.tar.gz
tar -zxvf php-7.3.23.tar.gz
cd php-7.3.23
useradd -r -M -s /sbin/nologin nginx
./configure --prefix=/usr/local/php7 --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx
make && make install
cp php.ini-production /usr/local/php7/php.ini
cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
vim/usr/local/php7/php.ini
cgi.fix_pathinfo=0
date.timezone = PRC
设置php-fpm服务开机自启动
chmod +x /etc/init.d/php-fpm
chkconfig php-fpm on
启动php-fpm服务 service php-fpm start
ln -s /usr/local/php7/bin/php /usr/bin/php
php -v
原文:https://www.cnblogs.com/haiqin/p/13901710.html