php升级

linux下php快速升级5.2.6由于linux默认yum源安装的是php5.1的包,

yum安装php以后查看

rpm-qaphp

php-5.1.6-23.2.el5_3

由于有的程序需要使用php5.2以上的版本

于是就找起了资料,终于找到有介绍如下添加一个额外的源:

#rpm–importhttp://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

#gedit/etc/yum.repos.d/utterramblings.repo

或者直接修改/etc/yum.repos.d/utterramblings.repo名字可以自己定义要以.repo结尾如abc.repo

在打开的文件中加入以下内容:

[abc]

name=Jason’sUtterRamblingsRepo

baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/

enabled=1

gpgcheck=1

gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

执行yumupdatephp如图所示,

#yumupdatephp

Loadedplugins:rhnplugin,security

ThissystemisnotregisteredwithRHN.

RHNsupportwillbedisabled.

utterramblings|951B00:00

utterramblings/primary|39kB00:03

utterramblings140/140

Skippingsecurityplugin,nodata

SettingupUpdateProcess

ResolvingDependencies

Skippingsecurityplugin,nodata

–>Runningtransactioncheck

–>ProcessingDependency:php=5.1.6-23.2.el5_3forpackage:php-devel

—>Packagephp.i3860:5.2.16-jason.1settobeupdated

–>ProcessingDependency:php-common=5.2.16-jason.1forpackage:php

–>ProcessingDependency:php-cli=5.2.16-jason.1forpackage:php

–>Runningtransactioncheck

—>Packagephp-cli.i3860:5.2.16-jason.1settobeupdated

。。。。。。。。

已经有新的php包尅更新

================================================================================

PackageArchVersionRepositorySize

================================================================================

Updating:

phpi3865.2.16-jason.1abc3.6M

Installingfordependencies:

mysqlclient15i3865.0.91-1.jason.1abc2.0M

Updatingfordependencies:

mysqli3865.1.52-jason.1abc3.5M

mysql-benchi3865.1.52-jason.1abc502k

mysql-develi3865.1.52-jason.1abc120k

mysql-serveri3865.1.52-jason.1abc13M

mysql-testi3865.1.52-jason.1abc7.3M

php-bcmathi3865.2.16-jason.1abc67k

php-clii3865.2.16-jason.1abc2.6M

php-commoni3865.2.16-jason.1abc513k

php-dbai3865.2.16-jason.1abc127k

php-develi3865.2.16-jason.1abc557k

php-gdi3865.2.16-jason.1abc331k

php-imapi3865.2.16-jason.1abc108k

php-ldapi3865.2.16-jason.1abc59k

php-mbstringi3865.2.16-jason.1abc1.3M

php-mysqli3865.2.16-jason.1abc267k

php-ncursesi3865.2.16-jason.1abc78k

php-odbci3865.2.16-jason.1abc116k

php-pdoi3865.2.16-jason.1abc164k

php-pgsqli3865.2.16-jason.1abc159k

php-snmpi3865.2.16-jason.1abc44k

php-soapi3865.2.16-jason.1abc352k

php-xmli3865.2.16-jason.1abc328k

php-xmlrpci3865.2.16-jason.1abc136k

TransactionSummary

================================================================================

Install1Package(s)

Update24Package(s)

Remove0Package(s)

Totaldownloadsize:37M

Isthisok[y/N]:y

安装后重启apache

查看php目前安装版本

#rpm-qaphp

php-5.2.16-jason.1

安装已经完成还可以使用php-m查看php支持的模块

文章来源:http://support.chinaccnet.com/archives/2604.html

相关推荐