基本流程
- 导入yum仓库并更新至8.5
yum update
yum upgrade
- 安装php7.4
yum install php7.4
- 配置php74和nginx
Q&A
- 权限问题
- 需要确保php74-php-fpm.service的实际执行用户和nginx中配置的用户一致,php74-php-fpm.service的用户需要通过修改配置文件/etc/opt/remi/php74/php-fpm.conf中的listen.owner和listen.group来配置,而实际的默认安装后的子配置文件在/etc/opt/remi/php74/php-fpm.d/www.conf中,但是这个/etc/opt/remi/php74/php-fpm.d/目录默认并没有被作为子配置路径包含在/etc/opt/remi/php74/php-fpm.conf中,需要在/etc/opt/remi/php74/php-fpm.conf的行尾添加include=/etc/opt/remi/php74/php-fpm.d/*.conf然后才能使得子配置生效,这一点和nginx的配置规则类似了。
- 同时该用户需要能够读取实际的项目文件,在本项目中也就是dzzOffice解压后的文件路径