码迷,mamicode.com
首页 > Web开发 > 详细

Ubuntu16.0(18.04)安装php(7.0 7.1 7.3.7.4)

时间:2020-07-17 16:26:41      阅读:97      评论:0      收藏:0      [点我收藏+]

标签:log   deb   org   uil   php -v   update   list   group   date   

Ubuntu安装php

    -

1、安装 PHP 7.4 on Ubuntu

    Ubuntu添加ppa源
    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
查看源中的版本:
    sudo apt list | grep php
安装php7.4
    sudo apt-get install  -y  php7.4
查看PHP版本:
    php -v 

2、安装 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.19-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 12 2020 07:48:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
            with Zend OPcache v7.3.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

3、安装 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-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 12 2020 07:48:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
            with Zend OPcache v7.3.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

4、安装 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+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 12 2020 07:48:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
            with Zend OPcache v7.3.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

5、安装 PHP 7.0 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-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 12 2020 07:48:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
            with Zend OPcache v7.3.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Ubuntu16.0(18.04)安装php(7.0 7.1 7.3.7.4)

标签:log   deb   org   uil   php -v   update   list   group   date   

原文地址:https://blog.51cto.com/11353391/2511315

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!