---
title: "CentOS php 升级到5.3的yum安装方法"
author: "hpcn"
date: "2011-08-26T17:28:53Z"
tags: []
categories: ["操作系统"]
slug: "centos-php-5-3-yum"
draft: false
lastmod: "2011-08-26T17:28:53Z"
id: 1158987
url: "https://hpcn.iteye.com/blog/1158987"
---

转自：http://www.unxmail.com/read.php?171

 

邪恶的centos 5,杯具,都这么多年了,想必玩php的都知道,这个php的版本还是5.1的,很多库都没有,官方的php5.3 都发布很久了,自己编译麻烦的话,用本人的方法,快速安全,php mysql 等都完全没有问题

 

```
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
yum --enablerepo=remi makecache
```

 

开始安装php,如果先前已经安装过php的,升级即可,全新安装的方法如下

```
yum --enablerepo=remi install php
```

 

升级的方法如下

```
yum --enablerepo=remi update php php-* 
```

 

经过我的测试,centos 64 和32位都是木有问题的