最新消息:

debian 安装php7_Debian 10.7安装PHP7.4和PHP8.0 作者:rain john@csdn.net

学习 林夕 400浏览

参考: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

6c1555302777729326ca3efa0910d9ec.png

apt install php7.4

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

6c1555302777729326ca3efa0910d9ec.png

6c1555302777729326ca3efa0910d9ec.png

apt search php8.0:

6c1555302777729326ca3efa0910d9ec.png

apt install php8.0

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

6c1555302777729326ca3efa0910d9ec.png

3. 执行php脚本:

6c1555302777729326ca3efa0910d9ec.png

来源:oschina

链接:https://my.oschina.net/michaelshu/blog/4874469

原帖地址:https://blog.csdn.net/weixin_35215045/article/details/115092251

转载请注明:一秒钟的梦 » debian 安装php7_Debian 10.7安装PHP7.4和PHP8.0 作者:rain john@csdn.net