redhat 6.5 php 升级到5.6

简介:

1. Verify current version of PHP

 

Type in the following to see the current PHP version:

 

php -v

 

Should output something like:

 

PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

 

Great, now we can move on!

 

2. Install the Remi and EPEL RPM repositories

 

If you haven’t already done so, install the Remi and EPEL repositories

 

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm

 

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

 

Enable the REMI repository globally:

 

nano /etc/yum.repos.d/remi.repo

 

Under the section that looks like [remi] make the following changes:

 

[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

 

Also, under the section that looks like [remi-php55] make the following changes:

 

[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

 

Type CTRL-O to save and CTRL-X to close the editor

 

3. Upgrade PHP 5.3 to PHP 5.6

 

Now we can upgrade PHP. Simply type in the following command:

 

yum -y upgrade php*

 

Once the update has completed, let’s verify that you have PHP 5.6 installed:

 

php -v

 

Should see output similar to the following:

 

PHP 5.6.14 (cli) (built: Sep 30 2015 14:07:43) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies


如果要安装zabbix 3.0 还需安装php-mbstring、php-bcmath

安装php-mbstring:yum install -y php-mbstring php-bcmath


参考博文:https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/




     本文转自1321385590 51CTO博客,原文链接:http://blog.51cto.com/linux10000/1943236,如需转载请自行联系原作者





相关文章
|
Linux PHP
Aliyun Linux 2 ,php7.0升级到7.4版本
在Aliyun Linux 2 部署LNMP时,系统源为php5.4,官方文档安装的版本为php7.0,现需要升级到7.4版本可使用如下方法。
1933 0
Aliyun Linux 2 ,php7.0升级到7.4版本
|
11月前
|
弹性计算 监控 Java
阿里云国际站代理商:如何在阿里云上升级PHP版本?
@luotuoemo飞机@TG 阿里云国际站代理商:如何在阿里云上升级PHP版本?在所选实例右侧的操作栏中,点击“更多”>“实例管理”,进入实例管理页面。在这里,您可以看到实例的详细信息,包括当前的PHP版本、操作系统类型等。
|
安全 关系型数据库 MySQL
使用php解压缩ZipArchive类实现后台管理升级的解决方案
使用php解压缩ZipArchive类实现后台管理升级的解决方案
86 0
|
安全 PHP C++
【技术分享】Win10 wampserver升级安装php7.2.32
【技术分享】Win10 wampserver升级安装php7.2.32
124 0
【技术分享】Win10 wampserver升级安装php7.2.32
|
关系型数据库 MySQL 应用服务中间件
Centos 7 升级PHP5.x到PHP7.3(php-fpm)
Centos 7 升级PHP5.x到PHP7.3(php-fpm)
1031 0
|
PHP
宝塔面板多PHP版本中编译安装升级Swoole
phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块。当php编译完成后,php的bin目录下会有phpize这个脚本文件。在编译你要添加的扩展模块之前,执行phpize就可以了;
409 0
|
Linux PHP
CentOS7 php7.0 升级到php7.3
CentOS7 php7.0 升级到php7.3
451 0
CentOS7 php7.0 升级到php7.3
|
Linux PHP
【Linux】将centos的默认PHP5.4升级到PHP5.6
【Linux】将centos的默认PHP5.4升级到PHP5.6
136 0
【Linux】将centos的默认PHP5.4升级到PHP5.6
|
应用服务中间件 PHP Apache
wordpress轻量应用服务器升级php版本
轻量应用服务器wordpress镜像默认使用php5.6版本,wordpress使用4.8.1。但是近期wordpress更新了版本,要求PHP版本不低于7.3,导致无法正常使用新版本wordpress,本文介绍如何手动编译更新PHP到7.3。
18425 3
|
Linux 应用服务中间件 PHP
下一篇
无影云桌面