Ubuntu apt-get installation method of PHP: First install PHP directly from the official PPA source; then view and display the list of software installation packages through "apt-cache pkgnames".
The operating environment of this article: ubuntu 16.04 system, PHP7.1 version, DELL G3 computer
Ubuntu apt-get installs the latest version of PHP
Directly use the official PPA source
sudo add-apt-repository -y ppa:ondrej/php sudo apt-get update
Display the list of software installation packages, whether you already have PHP 7.1, optional
apt-cache pkgnames | grep php7.1
installation, Tuesday, May 08, 2018, now The latest version is 7.2
sudo apt-get install php7.2-fpm
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to install php with ubuntu apt-get. For more information, please follow other related articles on the PHP Chinese website!