#自带的只有5.4版本

yum provides php

  

[root@localhost etc]# yum provides php
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
* webtatic: uk.repo.webtatic.com
mod_php71w-7.1.26-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.26-1.w7 mod_php71w-7.1.27-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.27-1.w7 mod_php71w-7.1.28-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.28-1.w7 mod_php71w-7.1.29-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.29-1.w7 mod_php71w-7.1.30-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.30-1.w7 mod_php71w-7.1.31-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.31-1.w7 mod_php71w-7.1.32-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.32-1.w7 mod_php71w-7.1.33-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.1.33-1.w7 mod_php72w-7.2.14-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.14-1.w7 mod_php72w-7.2.16-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.16-1.w7 mod_php72w-7.2.17-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.17-1.w7 mod_php72w-7.2.19-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.19-1.w7 mod_php72w-7.2.21-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.21-1.w7 mod_php72w-7.2.22-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.22-1.w7 mod_php72w-7.2.24-1.w7.x86_64 : PHP module for the Apache HTTP Server
Repo : webtatic
Matched from:
Provides : php = 7.2.24-1.w7 php-5.4.16-46.el7.x86_64 : PHP scripting language for creating dynamic web
: sites
Repo : base php-5.4.16-46.1.el7_7.x86_64 : PHP scripting language for creating dynamic
: web sites
Repo : updates php55w-5.5.38-1.w7.x86_64 : PHP scripting language for creating dynamic web
: sites
Repo : webtatic
Matched from:
Provides : php = 5.5.38-1.w7 php56w-5.6.40-1.w7.x86_64 : PHP scripting language for creating dynamic web
: sites
Repo : webtatic
Matched from:
Provides : php = 5.6.40-1.w7 php70w-7.0.33-1.w7.x86_64 : PHP scripting language for creating dynamic web
: sites
Repo : webtatic
Matched from:
Provides : php = 7.0.33-1.w7

  

#更新源

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

  

#移除系统自带的php-common

yum remove php-common -y

  

#安装依赖包

yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring

  

#版本变为7.2

php -v

  

显示以下结果

PHP 7.2.24 (cli) (built: Oct 26 2019 12:28:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24, Copyright (c) 1999-2018, by Zend Technologies

  

centos7 升级php版本到7.2的更多相关文章

  1. Centos7升级Git版本

    centos 升级 Git 版本 问题描述 centos7 系统默认的 git 安装版本是 1.8,但是在项目构建中发现 git 版本过低,于是用源码编译的方式进行升级.同时该文章也适用于安装新的 g ...

  2. Centos7升级gcc版本方法之一使用scl软件集

    Centos7 gcc版本默认4.8.3,Red Hat 为了软件的稳定和版本支持,yum 上版本也是4.8.3,所以无法使用yum进行软件更新,所以使用scl. scl软件集(Software Co ...

  3. CentOS7 升级gcc版本

    CentOS7自带的GCC版本是4.8.5,如下所示: # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # which g ...

  4. centos7 升级php版本

    centos7 默认PHP5.4,版本太低,很多要求至少PHP5.5 1.查看已经安装的PHP组件 yum list installed| grep php php.x86_64 -.el7 @bas ...

  5. Centos7 升级内核版本

    1.查看当前内核版本 $ uname -r -.el7.x86_64 $ uname -a Linux k8s-master -.el7.x86_64 # SMP Tue Nov :: UTC x86 ...

  6. centOS7升级git版本到2.7.3

    CentOS 自带的git版本太低,需要升级到2.1.2版本以上才能使用gitea. 升级方法: 1.安装所需软件包 yum install curl-devel expat-devel gettex ...

  7. centos7升级Python版本后,yum不能正常使用

    python升级方法,使用源码编译安装即可,prefix=/usr/local/bin/python3 执行yum list,提示/usr/bin/yum 报错 我是直接在Python2.7的基础上又 ...

  8. CentOS7升级OpenSSL版本

    1.CentOS7.6默认安装的openssl版本为 # 查看openssl版本 openssl version 2.下载最新的openssl wget https://www.openssl.org ...

  9. Centos7 升级php版本到php7

    一.首先查看是否有老版本 yum list installed | grep php 二.如果安装的有 yum remove php.x86_64 php-cli.x86_64 php-common. ...

  10. centos7升级内核版本

    本文转载http://blog.csdn.net/nciasd/article/details/51490146,大神非常厉害!!!!! 查看当前系统的内核版本 # uname -r 1.导入key ...

随机推荐

  1. CF 585 E Present for Vitalik the Philatelist

    CF 585 E Present for Vitalik the Philatelist 我们假设 $ f(x) $ 表示与 $ x $ 互质的数的个数,$ s(x) $ 为 gcd 为 $ x $ ...

  2. 洛谷 P6072 -『MdOI R1』Path(回滚莫队+01-trie)

    题面传送门 又是 ix35 神仙出的题,先以 mol 为敬 %%% 首先预处理出根节点到每个点路径上权值的异或和 \(dis_i\),那么两点 \(a,b\) 路径上权值的异或和显然为 \(dis_a ...

  3. P4569 [BJWC2011]禁忌

    题目传送门. 题意简述:给出大小为 \(n\) 的字典 \(s\).设函数 \(g(t)\) 表示 \(t\) 最多能被分割成的单词个数.等概率随机生成长度为 \(len\) 的字符串 \(T\),求 ...

  4. expr计算字符串长度

    命令:expr length "quanzhiqinag" #!/bin/bash for N in quan zhi qiang do if [ `expr length $N ...

  5. vc控制台程序关闭事件时的正确处理方式

    百度可以找到很多关于这个问题解决的方法 关键控制台API函数:SetConsoleCtrlHandler 在支持C++ 11以上的编译器中,你可以这么做. SetConsoleCtrlHandler( ...

  6. MybatisPlus的CRUD及拓展

    创建一个简单的MybatisPlus项目在上一篇博客:MybatisPlus入门程序 一.CRUD 1. select 1.1 查找全部用户 //查 @Test public void select( ...

  7. 巩固javaweb的第二十三天

    巩固内容: 调用验证方法 验证通常在表单提交之前进行,可以通过按钮的 onClick 事件,也可以通过 form 表单 的 onSubmit 事件来完成. 本章实例是通过 form 表单的 onSub ...

  8. aboard, abolish

    aboard board做动词有上车/船/飞机的意思,boarding就是正在上.board做名词有板的意思,车厢地板的板. a是个词根,有三种意思:1. 以某种状态或方式,如: ablaze, af ...

  9. 零基础学习java------39---------json格式交互,Restful(不懂),静态资源映射,SSM整合(ssm整合思想,application.xml文件详解(声明式事务管理),)

    一. json格式交互(知道) 1 . 回顾ajax基本语法 $.ajax({ url:"", // 请求的后台路径 data:{"":"" ...

  10. 【STM32】WS2812介绍、使用SPI+DMA发送数据

    这篇要使用到SPI+DMA,需要了解的话,可以参考我另两篇博客 时钟:https://www.cnblogs.com/PureHeart/p/11330967.html SPI+DMA通信:https ...