Debian 10.7安装PHP7.4和PHP8.0

我与影子孤独终老i 提交于 2021-01-03 23:41:15

参考:https://idroot.us/install-php-7-4-debian-10/

1. 安装前升级系统:
sudo apt update
sudo apt upgrade

2. 在Debian 10.7安装PHP 7.4:
apt -y install lsb-release apt-transport-https ca-certificates wget
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

添加仓库:
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

apt update
apt search php7.4


apt install php7.4
apt install php7.4-{fpm,cli,gd,bcmath,common,xml,xmlrpc,intl,soap,mbstring,mysql,ldap,opcache,bz2,zip}

apt search php8.0:

apt install php8.0
apt install php8.0-{fpm,cli,gd,bcmath,common,xml,xmlrpc,intl,soap,mbstring,mysql,ldap,opcache,bz2,zip}

3. 执行php脚本:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!