dnf upgrade
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module enable php:remi-8.0 -y
sudo dnf module list php
sudo dnf install php php-cli php-common
php -v
sudo dnf install httpd -y
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
安装扩展
sudo dnf search php-*
sudo dnf install php-gd php-mbstring php-mysqlnd
php -m
php -m | grep extension-name