Centos7 升级php版本到php7
一、首先查看是否有老版本
yum list installed | grep php
二、如果安装的有
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
三、老版本清理干净之后,进行升级
1、由于linux的yum源不存在php7.x,所以我们要更改yum源:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm


2、查看yum源中有没有php7.x
yum search php7
看到下图,证明php已经存在yum源中


3、yum 安装php72w和各种拓展,选自己需要的即可:
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

安装完成
4、查看php版本
php -v

原文:https://jingyan.baidu.com/article/870c6fc3460834b03fe4be06.html
Centos7 升级php版本到php7的更多相关文章
- Centos7升级Git版本
centos 升级 Git 版本 问题描述 centos7 系统默认的 git 安装版本是 1.8,但是在项目构建中发现 git 版本过低,于是用源码编译的方式进行升级.同时该文章也适用于安装新的 g ...
- Centos7升级gcc版本方法之一使用scl软件集
Centos7 gcc版本默认4.8.3,Red Hat 为了软件的稳定和版本支持,yum 上版本也是4.8.3,所以无法使用yum进行软件更新,所以使用scl. scl软件集(Software Co ...
- CentOS7 升级gcc版本
CentOS7自带的GCC版本是4.8.5,如下所示: # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # which g ...
- centos7 升级php版本
centos7 默认PHP5.4,版本太低,很多要求至少PHP5.5 1.查看已经安装的PHP组件 yum list installed| grep php php.x86_64 -.el7 @bas ...
- Centos7 升级内核版本
1.查看当前内核版本 $ uname -r -.el7.x86_64 $ uname -a Linux k8s-master -.el7.x86_64 # SMP Tue Nov :: UTC x86 ...
- centOS7升级git版本到2.7.3
CentOS 自带的git版本太低,需要升级到2.1.2版本以上才能使用gitea. 升级方法: 1.安装所需软件包 yum install curl-devel expat-devel gettex ...
- centos7升级Python版本后,yum不能正常使用
python升级方法,使用源码编译安装即可,prefix=/usr/local/bin/python3 执行yum list,提示/usr/bin/yum 报错 我是直接在Python2.7的基础上又 ...
- CentOS7升级OpenSSL版本
1.CentOS7.6默认安装的openssl版本为 # 查看openssl版本 openssl version 2.下载最新的openssl wget https://www.openssl.org ...
- centos7升级内核版本
本文转载http://blog.csdn.net/nciasd/article/details/51490146,大神非常厉害!!!!! 查看当前系统的内核版本 # uname -r 1.导入key ...
随机推荐
- css grid 随笔
原文出自Arien的博客https://www.w3cplus.com/css3/line-base-placement-layout.html 首先定义一个网格 1.可以给父容器的display属性 ...
- POJ 1087 最大流裸题 + map
A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15597 Accepted: 5308 ...
- python模块turtle简单用法
##初始化turtle:t = turtle.Turtle() 或者 t = turtle.Pen()##查询turtle状态#位置t.position() #箭头朝向,箭头朝向按照顺时针或者逆时针偏 ...
- Apicloud_(接口验证)用户注册头部信息X-APICloud-AppKey生成
接口验证KEY生成规则说明 官方文档: 传送门 "X-APICloud-AppKey"生成规则是基于SHA1()算法生成的 AppKey= SHA1(你的应用ID + 'UZ' + ...
- JS框架_(Popup.js)3D对话框窗口插件
百度云盘 传送门 密码:afdo 3D对话框窗口插件效果: <!doctype html> <html lang="zh"> <head> &l ...
- AES加密算法在Linux下出现随机加密结果
特别提示:本人博客部分有参考网络其他博客,但均是本人亲手编写过并验证通过.如发现博客有错误,请及时提出以免误导其他人,谢谢!欢迎转载,但记得标明文章出处:http://www.cnblogs.com/ ...
- leetcode-easy-listnode-237 Delete Node in a Linked List
mycode # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # sel ...
- java 方法的重载重写
面向对象有三大特性:封装,继承,多态 多态则需要满足三大条件1要有继承2要有重写3父类引用子类对象 很多人对方法的重载重写有很大疑问,下面我来介绍一下方法的重载重写 方法重载就是方法名称重复,加载参数 ...
- 全面解读PHP-JS和jQuery
一.变量的定义 1.未使用值来申明的变量,其值为 undefined. 2.如果重新声明一个变量,该变量的值不会丢失. //定义一个变量 var str = 'hello'; //重新申明 var s ...
- HTML+CSS实现导航栏二级下拉菜单完整代码
工具是vs code 代码如下 <!DOCTYPE html> <html lang="en"> <head> <meta charset ...