安装PHP步骤如下:
- yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
- yum install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
- yum install yum-utils
- yum-config-manager --enable remi-php74
- yum install php php-devel (这里只安装了PHP的最基本的核心库,如果需要其他的库,需要通过yum install php-xxx来安装)
- 执行php -v 确认php安装成功。