How to Install php 5.2.2 on centos 4.5

Discussion in 'Installation/Configuration' started by cape, Jun 10, 2007.

  1. cape

    cape New Member

    Hi folks

    How to Install php 5.2.2 on centos 4.5?


    thx
     
  2. Ben

    Ben Active Member Moderator

    just use the packetmanager yum

    to download updates:
    yum update

    search for packets:
    yum serach "packetname"
    -> yum search php
    or
    -> yum list | grep packetname
    in my eyes it gives you a better overview than search
    that will show you available packets.

    install these with

    yum install "package1"

    -> yum install php
     
  3. cape

    cape New Member

    Hi Ben

    thank you for info . i am not that bad know how to use yum:)

    but only available ver of php that yum shows me is 5.1.6

    Is 5.2.2 not available under centos???
     
  4. Ben

    Ben Active Member Moderator

  5. subse7en

    subse7en New Member

    How to Install PHP 5.2.x on CentOS 4.5

    To install PHP 5.2.5 (Highest in repository at this time) you can make use of a RPM repository maintained by Remi. He has a repository for each distro, but to save you translating for the ES5 one I’ll give you the commands here. Run the following to get up and running:

    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm
    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

    You now have the Remi repository on your system, however it is disabled by default. Obviously you don’t want all of your packages been effected by this repository, however to enable it for a specific package, run the following:

    yum --enablerepo=remi update php

    You should now have the latest PHP5 installed:

    # php -v
    PHP 5.2.5 (cli) (built: Nov 10 2007 10:52:30)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
     
  6. XaraX

    XaraX New Member

    if you get the error "Could not find update match for php", you may have installed yum-priorities package. just to be sure:

    $ rpm -q yum-priorities

    if its installed, then you should disable it temporarily to update php via remi's repo:

    $ sudo vi /etc/yum/pluginconf.d/priorities.conf

    change the line "enabled = 1" to "enabled = 0". then try again:

    $ yum --enablerepo=remi update php

    it should work. btw, don't forget to enable priorities again after the update.
     
  7. ramkot

    ramkot New Member

    @subse7en Thanks for you post. This is three years after your post and PHP5.2 is still not available via YUM. And I still can't upgrade to 5.2.

    I followed your steps and updated the download to the current ones:
    Code:
    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-8.el5.remi.noarch.rpm  rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
    Then executed:
    Code:
    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
    And received the following warnings:
    Code:
    warning: remi-release-5-8.el5.remi.noarch.rpm: V3 DSA signature: NOKEY, key ID 00f97f56
    warning: epel-release-5-4.noarch.rpm: V3 DSA signature: NOKEY, key ID 217521f6
    Preparing...                ##################################################
    epel-release                ##################################################
    remi-release                ##################################################
    
    Ignored the warnings and ran yum:
    Code:
    yum --enablerepo=remi update php
    Among the output, it produced the following error:
    Code:
    --> Processing DepenError: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package libedit
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package libedit
    dency: libmysqlclient.so.15 for package: mod_auth_mysql

    After finishing the process, the PHP version is still 5.1.6.

    Any ideas? Any help is greatly appreciated. I'm a very light Linux/CentOs user btw.
     

Share This Page