centos5.5 yum安装 php5.3

1,先卸载php

 

    查询本机已安装的php:

rpm -qa | grep php

    卸载:

rpm -e php-5.1.6-39.el5_8 php-common-5.1.6-39.el5_8 php-cli-5.1.6-39.el5_8
 

2,安装第三方源

 

rpm -Uhv http://mirrors.ircam.fr/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
rpm -Uhv http://mirrors.ircam.fr/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm

 

3,安装php

 

yum --enablerepo=ius install php54 php54-mysql

 

4,测试

 

httpd -t -D DUMP_MODULES

 Loaded Modules:
 core_module (static)

 ......

 php5_module (shared)
 ......
Syntax OK

 

php -v

 PHP 5.3.16 (cli) (built: Sep  5 2012 18:29:29)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

你可能感兴趣的:(PHP,centos,yum)