Home  >  Article  >  Backend Development  >  How to install php with ubuntu apt-get

How to install php with ubuntu apt-get

藏色散人
藏色散人Original
2021-05-27 09:29:421987browse

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".

How to install php with ubuntu apt-get

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn