0

I think this is the first question I should have asked.

5.1 is the default on CentOS 5.7. I figured I would upgrade to 5.3, but ran into a dead end when php53-mhash and php53-pear were not available on EPEL or the default repos (?).

Is 5.2 easier to ugprade to? I.e. will it be easier for me to find the modules I need (could not find php53-mhash or php53-pear, but perhaps they are available for php 5.2?)?

EDIT:

Also, since I'm new to CentOS and the repository system, can you please give an example?

From what I understand, there are several steps.

I think this is the first question I should have asked.

5.1 is the default on CentOS 5.7. I figured I would upgrade to 5.3, but ran into a dead end when php53-mhash and php53-pear were not available on EPEL or the default repos (?).

Is 5.2 easier to ugprade to? I.e. will it be easier for me to find the modules I need (could not find php53-mhash or php53-pear, but perhaps they are available for php 5.2?)?

EDIT:

Also, since I'm new to CentOS and the repository system, can you please give an example?

From what I understand, there are several steps.

1.) "Activate" (install?) appropriate repository on your system so that you can download from it.

I think it's something like

rpm -Uvh http://example.com/redhat/el$releasever/en/$basearch/asdf

2.) Then the regular yum update command will check with the newly-installed 3rd part repository as well as the built-in ones:

yum install php53-mhash

please let me know if that all makes sense and is correct. thank you

2 Answers 2

1

Ok, I'll just answer my own question then:

Here's how you do it.

1.) remove all currently installed PHP packages, just to be sure everything is clean

(you can try skipping this step if you want to try upgrading what you already have. See the last part of 3.))

$ yum remove php-\*

2.) Activate the Remi repository:

As root (or using sudo), go to /etc/yum.repos.d/ and do:

$ wget http://rpms.famillecollet.com/enterprise/remi.repo

3.) Install your packages.

Since the remi repo is off by default, you have to specify it at yum-time:

$ yum --enablerepo=remi install php-pdo php-xml php-pear php-mhash php-mcrypt php-gd php-mysql

Now you should have all the latest php packages. Alternatively, if you already have PHP installed and just want to upgrade what you already have, skip step 1, do step 2, and then do this:

$ yum --enablerepo=remi upgrade php-\*

4.) Be disappointed. In my case, everything installed without error except php-mysql. The problem seems to be that it expects the latest version of mysql. So I have to try to upgrade mysql before the php-mysql will install properly.

6
  • +1 for persisting and managing to make it (mostly) work. A few points: a) php-mhash has been obsoleted by the Hash package built into php 5.3 (although, if you are using code that depends on mhash, that might not be relevant). b) PEAR can be installed manually, without using yum (I recall it was an issue originally). c) Finally, as you have noticed, using a repository that isn't fully compatible comes at a cost - the dependencies don't always match, so you sometimes have conflicts.
    – cyberx86
    Jan 30, 2012 at 6:28
  • @cyberx86 Thanks I have discovered that the default MySQL installation appears to be 32 bit, even though my arch is 64 bit. I get conflict "mysql-libs-5.5.20-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386". Why in Zeus' name does $ yum install mysql-server give me the 32bit version on my 64bit machine? I am stuck in RHELL! Jan 30, 2012 at 6:59
  • I suspect that you would have the same conflict even if they weren't different versions. You'll notice that the Remi packages have .remi in their names - the dependencies of these are usually also .remi packages. It is one of the reasons I prefer EPEL - all the packages are fully 'drop in' compatible with the RHEL/CentOS base. As for 32 bit - I am not sure why that might be (I presume you removed the 32 bit EPEL repository you installed earlier - although, it doesn't provide mysql-server). One good reason for using 32 bit though, is that it takes less memory (if you have <= 4GB, it is better)
    – cyberx86
    Jan 30, 2012 at 7:12
  • Hmm, you have a point there. Currently our server is only 4GB. I think we will add more later but for now, perhaps I will try to trick Remi into thinking my arch is 32 bit and see if I can finish the MySQL upgrade that way and get php-mysql and the whole thing working. The whole reason I'm using REMI is because I didn't think EPEL had what I needed. Oh boy. Jan 30, 2012 at 7:32
  • That probably wouldn't be a good idea - the packages are compiled against a specific version - if they don't have that version to work with, it can lead to a lot more problems than you have now. (You could have probably made EPEL work actually; something to consider is that you can rebuild an rpm if you need to - although, you lose the advantage of a package manager, it can help with dependencies - last resort though, just about compiling from source). Of course, you could just upgrade your MySQL to use Remi's version and be done with it (easier said than done, perhaps).
    – cyberx86
    Jan 30, 2012 at 7:46
0

Remi's repo packages 5.3 with mhash

http://rpms.famillecollet.com/

I use it and the rpms work great

3
  • Hey thanks, but could you please add some more codez per my newly-edited question? How do I install remi's repo correctly for my distro/arch? Thanks so much. Jan 30, 2012 at 5:05
  • @ButtleButkus: The RPMs needed to setup the repo are on the page above (Remi's repo is quite well known), however, for CentOS 5: rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm should suffice. Be advised though, that these may conflict with any existing PHP installations you have. You probably need to uninstall the existing PHP first (although, yum will advise you of any conflicts).
    – cyberx86
    Jan 30, 2012 at 5:24
  • @cyberx86 I ended up posting my own answer. Please feel free to correct it if I made any mistakes, but it seemed to work on my system. Rather than using the rpm command, I used wget, as per instructions on remi's site. I did remove all PHP before running my install and as noted in my answer, the only problem was the php-mysql conflict with mysql. Jan 30, 2012 at 5:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .