首页 > Web开发 > 详细

06-Ubuntu18.04&16.04安装PHP(7.0|7.1|7.2|7.3)

时间:2019-08-22 12:44:39      阅读:73      评论:0      收藏:0      [点我收藏+]

安装 PHP 7.3 on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3

查看PHP版本:

php -v 

PHP 7.3.0-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Dec  6 2018 20:24:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.0-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

安装 PHP 7.2 on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.2

查看PHP版本:

php -v 

PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

安装 PHP 7.1 on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1

查看PHP版本:

php -v 

PHP 7.1.24-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 12 2018 09:23:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.24-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

安装 PHP 7.0 on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0

查看PHP版本:

php -v 

PHP 7.0.32-4+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov  4 2018 05:11:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.32-4+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, b

06-Ubuntu18.04&16.04安装PHP(7.0|7.1|7.2|7.3)

原文:https://www.cnblogs.com/chengfengchi/p/11393531.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!