Windows 10 子系统 Debian 安装PHP7.4

2020-02-21  本文已影响0人  亻火子
#切换到ROOT用户
sudo -i
#更新软件源
apt update
apt upgrade -y

#添加SURY PHP PPA存储库
apt -y install lsb-release apt-transport-https ca-certificates 
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" | tee /etc/apt/sources.list.d/php.list

#更新添加的存储库上的系统软件包列表
apt update
#安装PHP7.4
apt -y install php7.4
php -v
PHP 7.4.3 (cli) (built: Feb 20 2020 14:15:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
#安装其它扩展,如:php-fpm
apt-get install php7.4-fpm
上一篇下一篇

猜你喜欢

热点阅读