在centos8 stream 上安装 php8.x

近几天,安装PHP多次,记录一下,备以后参考:

dnf upgrade --refresh -y
# reboot
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf install dnf-utils -y
dnf remove php php-fpm -y
dnf remove php* -y
dnf module list reset php -y
dnf module list php -y
dnf module enable php:remi-8.0 -y   # 指定版本
dnf install nginx -y # 安装php-fpm时,会写入相应的配置文件
dnf install php -y
dnf install -y php-cli php-fpm php-curl php-mysqlnd php-gd php-opcache php-zip php-intl php-common php-bcmath php-imap php-imagick php-xmlrpc php-json php-readline php-memcached php-redis php-mbstring php-apcu php-xml
systemctl enable php-fpm nginx
systemctl restart nginx php-fpm

你可能感兴趣的:(运维,php,centos8,nginx)