Solved

updating php to 5.2 on redhat 5.3

Posted on 2009-05-07
20
979 Views
Last Modified: 2013-12-06
I have redhat 5.3 enterprise installed. I need to update PHP to 5.2.0.

Can someone walk me through this? I am very new so step by step would be nice :)

Thanks!
0
Comment
Question by:nrizk07
  • 9
  • 8
  • 3
20 Comments
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
Hi,

Currently RHEL / Centos 5 suppports 5.1.x. But Remi release have 5.2 functionality. Here's a link that explains. It is simple.

http://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-es5-centos-5-etc/

But my own experience tells me after finishing the installation it is is always a good idea to get rid of the old relase files. Use a command like that:

rpm -qa | grep php | grep "5.1.6"

Once you make sure only the necessary filaes are displayed execute this:

rpm -qa | grep php | grep "5.1.6"  | xargs rpm -ev

This will prevent further repo conflicts.

Cheers,
K.
0
 

Author Comment

by:nrizk07
Comment Utility
I tried that site but when trying to get the "remi" second rpm i get 404 "not found"
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 500 total points
Comment Utility
Hi,

The file has been obsoletd the new version is here:

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

If you had point your browser to :
http://rpms.famillecollet.com/el5.i386

This would give you a list. When ou locaret the remi you'd get the latest version :)

0
 

Author Comment

by:nrizk07
Comment Utility
Getting a strange error now when I do the rpm -Uvh command..

says:
package epel-release-5-3.noarch (which is newer than epel-release-5-2.noarch) is already installed...

??
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
It means that a newer version of epel is already installed. So you won't need to downgrade it.
Go ahead to continue the installation where you were left off. These instructions I've posted earlier are simply guidelines for the steps to follow. They just won't need to give you exact same results. Bewcause it is not very easy to keep them updated all the time where any component could be updated by authors at any time. For now as you've seen remi is newer and apparently epel too. These rpms simply install repo files in to your repository list  (i.e., under /etc/yum.repos.d and necessary modifications to your /etc/yumconf). Note the noarch prefix. It means that the contents is simply config files or other non-binary stuff.
0
 

Author Comment

by:nrizk07
Comment Utility
Quick question how do i know this didn't messup my current repository (updates through RHN redhat network)??

0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
Ok they just modify so that PHP is brought from remi repo not the updates repo of RHN. This is how repos are currently running. If you want to check just do a yum update :)
also you can check the contents of the files located in /etc/yum.repos.d/
0
 

Expert Comment

by:wownetwork
Comment Utility
I am gettting an error:

warning
[root@****** ~]# rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
warning: remi-release-5-7.el5.remi.noarch.rpm: Header V4 DSA signature: NOKEY, key ID 00f97f56
warning: epel-release-5-2.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
error: Failed dependencies:
        yum is needed by remi-release-5-7.el5.remi.noarch

What I did was this:

Step 1: #wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

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

I have:
Linux
PHP Version:  5.1.6
Web Server:  Apache/2.2.6 (Fedora)
Database Version:  5.0.22

Thanks.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
It says you need the yum package first. Please  install yum first.
0
 

Expert Comment

by:wownetwork
Comment Utility
Oops. Forgot to mention.

How do you install yum.  My bad.  I am no expert, but I follow steps very good.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
0
 

Expert Comment

by:wownetwork
Comment Utility
In the first line it says:
If you are using fedora you don't have to install it, it is part of fedora itself.

Web Server:  Apache/2.2.6 (Fedora)

I read on, is YUM something I turn on?
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
Yeah but for some reason it seems that you're system is missing yum. In fact yum is the default installation package for RedHAT EL 5 and Fedora. I was very surprised to see that your system is missing it.

will you do:

rpm -qa | grep yum

0
 

Expert Comment

by:wownetwork
Comment Utility
returns nothing...
0
 

Expert Comment

by:wownetwork
Comment Utility
Maybe b/c this is a VPS and I am using a company to HOST my domain.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
You can istall it easily using the link I provided.

0
 

Expert Comment

by:wownetwork
Comment Utility
I followed it and I get this:

[root@****** ~]# wget http://yum.baseurl.org/download/3.2/yum-3.2.0-1.src.rpm
--12:37:56--  http://yum.baseurl.org/download/3.2/yum-3.2.0-1.src.rpm
Resolving yum.baseurl.org... 140.211.167.207
Connecting to yum.baseurl.org|140.211.167.207|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 296761 (290K) [application/x-rpm]
Saving to: `yum-3.2.0-1.src.rpm'

100%[=============================================================>] 296,761      489K/s   in 0.6s

12:37:57 (489 KB/s) - `yum-3.2.0-1.src.rpm' saved [296761/296761]

[root@****** ~]# rpm -ivh yup*
error: File not found by glob: yup*
[root@****** ~]# rpm -ivh yum*
warning: yum-3.2.0-1.src.rpm: Header V3 DSA signature: NOKEY, key ID 69886cc7
error: cannot create %sourcedir /usr/src/redhat/SOURCES

Also the website says rpm -ivh yup* >> should this be yum?  I tried both anyways still got the above problem....
0
 

Expert Comment

by:wownetwork
Comment Utility
Hi the problem is I don't have YUM installed on my VPS.
I use Network Solutions >> They gave me a little help today:

Install Yum dependencies:
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-elementtree-1.2.6-5.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/rpm-python-4.4.2-32.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-urlgrabber-2.9.9-2.noarch.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/yum-metadata-parser-1.0-8.fc6.x86_64.rpm

then install yum:
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/yum-3.0-6.noarch.rpm

Yet each one of these links are BROKEN?  Secondly they take 48 hours to get back to me.
Does anyone have any advice?  Yum Dependencies????

Again, here is my VPS info:
Linux
PHP Version:  5.1.6
Web Server:  Apache/2.2.6 (Fedora)
Database Version:  5.0.22
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
Hi,

The problem here is you're trying to install yum sources. This will require all the source stanza to be present. If I were you I'd change my VPS provider for starters. It is meaningless to give a bare system without yum..  After I've learnt that you're using a VPS service I've procured a VPS service. It is very cheap and the Provide CentOS it is all for 19.95/month. It is here:
http://www.ultrahosting.com/

If you still want to stay with them here's my requests from you:

Will you please post here the contents of your /etc/redhat-relase

I want to make sure if yr really using RHEL 5.3 or CentOS (free community supported version of RHEL)

0
 

Expert Comment

by:wownetwork
Comment Utility
Great! I will pass it on to Network Solutions and vent my frustration on your behalf as well :)

/etc/redhat-relase:
Fedora Core release 6 (Zod)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now