#自带的只有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. SAM 做题笔记(各种技巧,持续更新,SA)

    SAM 感性瞎扯. 这里是 SAM 做题笔记. 本来是在一篇随笔里面,然后 Latex 太多加载不过来就分成了两篇. 标 * 的是推荐一做的题目. trick 是我总结的技巧. I. P3804 [模 ...

  2. Docker 外部访问容器Pp、数据管理volume、网络network 介绍

    Docker 外部访问容器Pp.数据管理volume.网络network 介绍 外部访问容器 容器中可以运行一些网络应用,要让外部也可以访问这些应用,可以通过 -P 或 -p 参数来 指定端口映射. ...

  3. excel-合并多个Excel文件--VBA合并当前目录下所有Excel工作簿中的所有工作表

    在网上找EXCEL多文件合并的方法,思路: 一.Linux 或者window+cmder,直接用命令行cat合并EXCEL文件,但是,需要安装辅助东西才能直接处理(也许也不可以,但是,可以用文件格式转 ...

  4. shell 脚本的基本定义

    注意不能有控制,指令之间 [1]shell脚本的基础知识 (1)shell脚本的本质 编译型语言 解释型语言 shell脚本语言是解释型语言 shell脚本的本质 shell命令的有序集合 (2)sh ...

  5. SpringCloud微服务实战——搭建企业级开发框架(二十八):扩展MybatisPlus插件DataPermissionInterceptor实现数据权限控制

    一套完整的系统权限需要支持功能权限和数据权限,前面介绍了系统通过RBAC的权限模型来实现功能的权限控制,这里我们来介绍,通过扩展Mybatis-Plus的插件DataPermissionInterce ...

  6. leetcode刷题之数组NO.4

    1.题目 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序. 示例: 输入: [0,1,0,3,12] 输出: [1,3,12,0,0] 说明: 必须在原数 ...

  7. 5分钟6步强制删除kubernetes NameSpace小技巧

    在使用kubernetes过程中,我们经常会遇到无法删除NameSpace的情况,但是如果一一去删除NameSpace中资源比较麻烦.下面我们给大家介绍强制删除NameSpace的方法. 一.查看已存 ...

  8. 通信方案软件设计(环形动态申请内存,支持USART+IIC+SPI+CAN协议

    1 <STM32进阶之串口环形缓冲区实现>中讲得比较清楚(链接) 2 amobbs中讲的方法有点复杂,以下是链接和参考源码: 通信方案软件设计(环形动态申请内存,支持USART+IIC+S ...

  9. 用户名、密码、整数等常用的js正则表达式

    1 用户名正则 //用户名正则,4到16位(字母,数字,下划线,减号) var uPattern = /^[a-zA-Z0-9_-]{4,16}$/; //输出 true console.log(uP ...

  10. tomcat 之 httpd session stiky

    # 注释中心主机 [root@nginx ~]# vim /etc/httpd/conf/httpd.conf #DocumentRoot "/var/www/html" #:配置 ...