alinux

Alibaba Cloud Linux 3 yum 安装 PHP8.1

一、安装源

rpm -ivh --nodeps https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sed -i 's/PLATFORM_ID="platform:al8"/PLATFORM_ID="platform:el8"/g' /etc/os-release
## 安装 PHP8.1 
sed -i 's/PLATFORM_ID="platform:el8"/PLATFORM_ID="platform:al8"/g' /etc/os-release

二、安装 PHP8.1

yum install -y php81-php-fpm php81-php-cli php81-php-bcmath php81-php-gd php81-php-json php81-php-mbstring php81-php-mcrypt php81-php-mysqlnd php81-php-opcache php81-php-pdo php81-php-pecl-crypto php81-php-pecl-mcrypt php81-php-pecl-geoip php81-php-recode php81-php-snmp php81-php-soap php81-php-xml php81-php-pecl-redis php81-php-pecl-apcu