感谢支持
我们一直在努力

CentOS 5.6 简单方法升级PHP到PHP 5.3.3

关键词:CentOS 5.6,PHP升级,PHP 5.3.3,CentOS PHP升级

Linux操作系统:CentOS 5.6

一、版本环境
 
# rpm -q php
 
二、用Yum 升级PHP
 
# yum update php
 
Could not find update match for php
 No Packages marked for Update
 看来Centos系统软件仓库中的php没有更新,又不想重新手动编译安装php,既然官方的yum源里面没有,那就添加一个源吧!
 
#  rpm –import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
 #  vim/etc/yum.repos.d/utterramblings.repo
 在打开的文件中加入以下内容:
 
[utterramblings]
 name=Jason’s Utter Ramblings Repo
 baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
 enabled=1
 gpgcheck=1
 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
 保存退出
 
# yum update php (在更新PHP时候mysql一起更新并报错;处理在第三大点)
 
Transaction Check Error:
  file /etc/my.cnf from install of mysql-5.1.58-jason.1.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
 
# yum update mysql
 
三、更新PHP时mysql报错的处理
 
1、首先把原本的PHP版本删除
 
# yum remove php*
 
2、查看一下是否删除
 
# rpm -q php
 
删除成功:package php is not installed
 
3、安装PHP53
 
# yum -y install php53*
 
注意:
 
php53-odbc64-5.3.3-2.el5.x86_64 from base has depsolving problems
  –> php53-odbc64 conflicts with php53-odbc
 Error: php53-odbc64 conflicts with php53-odbc
  You could try using –skip-broken to work around the problem
  You could try running: package-cleanup –problems
                        package-cleanup –dupes
                        rpm -Va –nofiles –nodigest
 The program package-cleanup is found in the yum-utils package.
 
# yum -y install php53* –skip-broken
 
安装成功会最后出现Complete!
 
4、查看PHP版本
 
# rpm -q php53
 php53-5.3.3-13.el5_8
 
5、启动PHP与MYSQL
 
# service httpd start
 
# service mysqld start

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

赞(0) 打赏
转载请注明出处:服务器评测 » CentOS 5.6 简单方法升级PHP到PHP 5.3.3
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏