博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
(二)Centos7下Yum更新安装PHP5.5,5.6,7.0
阅读量:6253 次
发布时间:2019-06-22

本文共 2853 字,大约阅读时间需要 9 分钟。

hot3.png

yum源默认的版本太低了,手动安装有一些麻烦,想采用Yum更新安装的可以使用下面的方案:

1.检查当前安装的PHP包

yum list installed | grep php

如果有安装的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

2、更换rpm源

Centos 5.X:    rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpmCentOs 6.x:    rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpmCentOs 7.X:    rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

如果想删除上面安装的包,重新安装

rpm -qa | grep webstaticrpm -e  上面搜索到的包即可

3.运行yum install

php5.5

yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64

php5.6

yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64

php7.0

yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64

4.安装PHP FPM

yum install php55w-fpm yum install php56w-fpm yum install php70w-fpmsystemctl enable php-fpm.service【开机自启动】

本次更新升级PHP版本即可完成!

 
 
G
M
T
 
 
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
 
AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
 
 
 
 
 
 
 
 
 
Text-to-speech function is limited to 200 characters
 
 
Options : History : Feedback : Close

转载于:https://my.oschina.net/botkenni/blog/1603656

你可能感兴趣的文章
Python使用chardet包自动检测编码
查看>>
Android必知必会-Android Studio修改包名
查看>>
bootstrap -- 一个标签中,同时有 col-xs , col-sm , col-md , col-lg
查看>>
IEEE754标准的浮点数存储格式
查看>>
Babel插件开发入门指南
查看>>
浅谈iOS 自动调节文本高度
查看>>
oracle易忘函数用法(2)
查看>>
总结系列_14(OpenCV2.4.3的新特征以及安装方法)
查看>>
虚拟地址空间分配
查看>>
HDU 4465 - Candy(概率与数学优化)
查看>>
提高你的Java代码质量吧:使用构造函数协助描述枚举项
查看>>
Struts2 学习笔记20 类型转换part2 写自己的转换器
查看>>
网站接入支付宝
查看>>
mybatis+spring配置
查看>>
新浪微博客户端(31)-显示相册图片上的GIF标记
查看>>
idea 项目打包发布
查看>>
x:Name 与 Name 有时候是不一样的。
查看>>
【ASP.NET】如何在asp后台实现弹出对话框
查看>>
XSS (Cross Site Scripting) Prevention Cheat Sheet(XSS防护检查单)
查看>>
Windows下将程序打包为安装包(最为简易的方式)
查看>>