Steps for ubuntu to install php7
Editor to share with you the operation steps of ubuntu installation of php7, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Ubuntu installs php7 by first executing the [add-apt-repository ppa:ondrej/php] command to change the php source, and then executing the [apt-get-y install php7.2] command to install php.
Official source on Ubuntu
For example, the default source of Ubuntu14.04 is PHP5.6.x, and the default source of Ubuntu16.04 is PHP7.0.x
Install through a third-party source
Ppa:ondrej/php is a well-known PHP source (currently maintains php5.6,php7.0,php7.1,php7.2,php7.3). Use this source to install the version of PHP you want.
Use ppa to add sources
Sudo apt-get install python-software-propertiessudo add-apt-repository ppa:ondrej/phpsudo apt-get update
View the PHP7.2 version in the source
Sudo apt list | grep php
Not surprisingly, the list already contains the version of PHP you want.
Install PHP7.2
Sudo apt-get-y install php7.2 above are all the steps for ubuntu to install php7. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!