php 7.3 is the stable version available for installation. This article will introduce how to install the latest version of PHP on Debian system. According to this article, you can install PHP on Debian10.
First conditions
Log in to the Debian10 system using shell access. For remote systems, use SSH to connect . Windows users can use Putty or other alternative applications for SSH connections.
Run the following command to upgrade the current package to the latest version.
$ sudo apt update $ sudo apt upgrade
Setup PPA on Debian10
Let us execute the following command to first install the required packages on the system. Then import the package signing key. After that, configure the PPA for the PHP package on the system.
$ sudo apt install ca-certificates apt-transport-https $ wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - $ sudo echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list
Debian10 system is ready to install PHP.
Installing PHP on Debian10
You can also install a stable PHP version on the system. Run the following command to install php7.3 on Debian10.
$ sudo apt update $ sudo apt install php7.3
Also install the required PHP modules.
$ sudo apt install php7.3-cli php7.3-common php7.3-curl php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-xml
After installation, use the following command to verify the installed and running PHP version
$ php -v PHP 7.3.1-1 (cli) (built: Jan 13 2019 10:13:20) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.1-1, Copyright (c) 1999-2018, by Zend Technologies
This article is all over here. For more other exciting content, you can follow the php Chinese website The PHP video tutorial column! ! !
The above is the detailed content of How to install PHP on Debian10. For more information, please follow other related articles on the PHP Chinese website!