主页 > 网络技术 > 通过yum升级php到5.3.2版本的方法

通过yum升级php到5.3.2版本的方法

去年9月安装的服务器,php的版本已经不能满足安装Kaltura Community Edition (KalturaCE)的需要了,于是必须升级php,采用yum update php*,竟然只能升级到5.1.6,看着安装提示里的:

Required PHP version 5.2.0 and above.  You need to upgrade your PHP

就对自己的服务器窝火,KalturaCE可是好东西呀,服务器不能直接升级PHP可麻烦了。

Kaltura logo
Kaltura logo

在网上找了点资料,终于找到一种升级CentOS的php到5.3.2的方法,步骤如下:

1、wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

2、wget http://rpms.famillecollet.com/enterprise/5/remi/i386/remi-release-5-7.el5.remi.noarch.rpm

3、rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

4、编辑/etc/yum.repos.d/remi.repo

#vi /etc/yum.repos.d/remi.repo

在这个文件的最后增加一行:priority=1

保存退出。

5、编辑/etc/yum.repos.d/epel-testing.repo,

#vi /etc/yum.repos.d/epel-testing.repo

在这个文件的最后增加一行:priority=1

保存退出。

6、编辑/etc/yum.repos.d/epel.repo

#vi /etc/yum.repos.d/epel.repo

在这个文件的最后增加一行:priority=1

保存退出。

7、使用下面的命令进行升级(经过测试,如果单独升级php将提示失败,只有连同mysql一起升级才可以,所以我们必须执行以下命令才能升级php到5.2.9版本):
yum –-enablerepo=remi update php* mysql*

以下为下载完成之后的执行过程,由于我本身的服务器参数和Mysql之前的升级问题,出现了以下加粗部分的警告提示,不在本文讨论范围之内:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56
Importing GPG key 0x00F97F56 “Remi Collet <RPMS@FamilleCollet.com>” from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

WARNING : This php-* RPM are not official Fedora build and
overrides the official ones. Don’t file bugs on Fedora Project.

Use dedicated forums http://forums.famillecollet.com/

  Updating       : php-common                                      [ 1/29]
warning: /etc/php.ini created as /etc/php.ini.rpmnew
  Installing     : mysqlclient15                                   [ 2/29]

WARNING : This MySQL RPM is not an official Fedora build and it
overrides the official one. Don’t file bugs on Fedora Project.
Use dedicated forums http://forums.famillecollet.com/

  Installing     : mysql-libs                                      [ 3/29]
  Updating       : mysql                                           [ 4/29]
  Installing     : libedit                                         [ 5/29]
  Updating       : php-cli                                         [ 6/29]
  Installing     : sqlite2                                         [ 7/29]
  Updating       : php-pdo                                         [ 8/29]
  Installing     : t1lib                                           [ 9/29]
  Updating       : php-gd                                          [10/29]
  Updating       : php-mysql                                       [11/29]
  Updating       : php-ldap                                        [12/29]
  Updating       : mysql-connector-odbc                            [13/29]
  Updating       : php                                             [14/29]
  Updating       : php-mbstring                                    [15/29]
  Updating       : mysql-devel                                     [16/29]
  Updating       : mysql-server                                    [17/29]
  Cleanup        : php-gd                                          [18/29]
  Cleanup        : php-mysql                                       [19/29]
  Cleanup        : php-pdo                                         [20/29]
  Cleanup        : php-common                                      [21/29]
  Cleanup        : mysql                                           [22/29]
  Cleanup        : php-ldap                                        [23/29]
  Cleanup        : mysql-connector-odbc                            [24/29]
  Cleanup        : php-cli                                         [25/29]
  Cleanup        : php                                             [26/29]
  Cleanup        : php-mbstring                                    [27/29]
  Cleanup        : mysql-devel                                     [28/29]
  Cleanup        : mysql-server                                    [29/29]

Dependency Installed: libedit.i386 0:2.11-2.20080712cvs.el5 mysql-libs.i386 0:5.1.45-1.el5.remi mysqlclient15.i386 0:5.0.67-1.el5.remi sqlite2.i386 0:2.8.17-2.el5.remi t1lib.i386 0:5.1.1-7.el5
Updated: mysql.i386 0:5.1.45-1.el5.remi mysql-connector-odbc.i386 0:3.51.26r1127-1.el5 mysql-devel.i386 0:5.1.45-1.el5.remi mysql-server.i386 0:5.1.45-1.el5.remi php.i386 0:5.3.2-1.el5.remi php-cli.i386 0:5.3.2-1.el5.remi php-common.i386 0:5.3.2-1.el5.remi php-gd.i386 0:5.3.2-1.el5.remi php-ldap.i386 0:5.3.2-1.el5.remi php-mbstring.i386 0:5.3.2-1.el5.remi php-mysql.i386 0:5.3.2-1.el5.remi php-pdo.i386 0:5.3.2-1.el5.remi
Complete!

8:重启Apache

#service httpd restart

, , , , ,

评论(关闭):9

发表评论
  1. seo
    10/03/24

    what a nice blog !

    • Steffi
      11/08/21

      Didn’t know the forum rules allowed such blirliant posts.

  2. usa-vps
    11/07/27

    epel-release-5-3.noarch.rpm这个是什么软件包,讲一下道理,为什么需要这样才能升级。

  3. MavisBranch
    11/08/05

    The personal loans seem to be essential for guys, which are willing to start their business. In fact, that’s very easy to receive a credit loan.

  4. RushGlenda
    11/08/06

    Don’t have a lot of money to buy a car? You not have to worry, just because it’s achievable to get the mortgage loans to solve all the problems. So get a short term loan to buy everything you want.

  5. SueDixon30
    11/08/17

    I will recommend not to hold back until you earn enough cash to order different goods! You should get the home loans or car loan and feel fine

  6. Cantrell31Lucy
    11/08/18

    One remembers that modern life is very expensive, but we need money for various things and not every person earns big sums cash. So to receive fast home loans or term loan would be a right solution.

  7. RosaCARMEN
    11/08/18

    It’s well known that money can make us disembarrass. But what to do if somebody doesn’t have cash? The only one way is to receive the mortgage loans or just financial loan.

  8. GILMORE23Francis
    11/08/21

    A lot of specialists say that business loans aid a lot of people to live the way they want, just because they are able to feel free to buy needed things. Furthermore, a lot of banks offer college loan for different classes of people.

顶部