PHP 5 in CentOS 4

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
eastcoastcoder
Posts: 16
Joined: 2005/06/19 05:59:28

PHP 5 in CentOS 4

Post by eastcoastcoder » 2005/06/19 06:05:08

Is there anyway, other than compiling the source tarball, to use PHP 5 in CentOS 4? I'd really like to use PHP 5, but I've learned from experience that once you compile on your own, it becomes difficult to keep up with updates and the like. I'm looking for a way that I can stick with yum etc but still use 5.

ddrysdale
Posts: 42
Joined: 2005/05/14 00:49:20
Location: New Brunswick Canada
Contact:

Re: PHP 5 in CentOS 4

Post by ddrysdale » 2005/06/20 13:06:45

If you go the one of the download mirrors and go into the centosplus/ dir you will find the php5 rpm's in i386/rpm or something like that. But keep in mind it is not production from what I understand.

tobyjoe
Posts: 3
Joined: 2005/06/04 17:07:22

Re: PHP 5 in CentOS 4

Post by tobyjoe » 2005/06/22 14:21:05

I would disagree that PHP5 isn't production-ready. I've been using PHP5 in production for a year or so. Wiley just published a book I wrote on PHP5, actually :)

I tend to recommend that PHP be compiled versus rpm'ed because there are so many options you will want to enable or disable depending on your needs and security policies. It's quite simple to compile, and, while you lose the ability to have automated updates, those are typically bad for middleware anyway, due to the potential that Web apps will break or open security holes if updates aren't carefully considered and audited.

ddrysdale
Posts: 42
Joined: 2005/05/14 00:49:20
Location: New Brunswick Canada
Contact:

Re: PHP 5 in CentOS 4

Post by ddrysdale » 2005/06/22 14:48:28

[quote]
ddrysdale wrote:
If you go the one of the download mirrors and go into the centosplus/ dir you will find the php5 rpm's in i386/rpm or something like that. But keep in mind it is not production from what I understand.[/quote]

I will withdraw my comment and agree with tobyjoe. I use php5 on production systems and php5 is stable. But you may run into problems with other programs that have poorly written code not working. The centos php5 package may or may not be good I can’t say, as I compiled from the SRPM and modified it to my needs.
I also agree you for the most part will have to compile from source. Especially if you want it to access mysql as it is disabled by default. I personally have developed a passion for compiling from SRPM's.

eastcoastcoder
Posts: 16
Joined: 2005/06/19 05:59:28

Re: PHP 5 in CentOS 4

Post by eastcoastcoder » 2005/06/23 15:22:33

Thanks.
Two questions:

1) If I do install the PHP5 RPM, what happens to the RPM's for all of the extensions?

2) Is there anyway to automate yum's updates if you use a SRPM? That is, to tell yum to d/l the SRPM update, build it, and install it? If not , is there anyway to at least have it alert you when an update is needed.

It's not that I am afraid to ./configure && make && sudo make install, it's just that my experience has shown that, for production systems, RPM is the way to go (note that for important systems I would *never* auto up2date or yum update - without testing manually first - but, still, RPM saves a lot of hassle on production boxes - esp. for mission critical components like middleware)

ddrysdale
Posts: 42
Joined: 2005/05/14 00:49:20
Location: New Brunswick Canada
Contact:

Re: PHP 5 in CentOS 4

Post by ddrysdale » 2005/06/28 15:27:45

1: By extensions do you mean like php-imap-5.0.4-1, php-pear-5.0.4-1 etc.

2: No you can’t. I don’t think you would want it to do it anyway. If you dl a srpm and compile it with no changes you will get the same rpm you would get from yum. You only use a srpm if you want to change a feature that has to be set when compiling. With php and example would be to add the ability for it to call misql and misqli or compile it for i686.

Kangus
Posts: 15
Joined: 2005/03/23 23:16:41

Re: PHP 5 in CentOS 4

Post by Kangus » 2006/10/10 19:10:06

Third try at posting:

I tried
yum install php-5*
yum install php5

what is the command to install php5?
thanks
yea, I do have the CentosPlus in yum.d

jasonxoxide
Posts: 80
Joined: 2006/09/11 14:35:48
Location: Exton, PA
Contact:

Re: PHP 5 in CentOS 4

Post by jasonxoxide » 2006/10/15 15:09:09

"yum update php" will work if the centosplus repo is actually enabled. If it isn't, you'll need to add a "--enablerepo=centosplus" before "update".

jasonxoxide
Posts: 80
Joined: 2006/09/11 14:35:48
Location: Exton, PA
Contact:

Re: PHP 5 in CentOS 4

Post by jasonxoxide » 2006/10/16 12:43:40

I forgot to mention that there are a couple packages that no longer exist in 5.x (don't recall exactly which ones). If you happen to have one of those installed (and you get dep errors), remove it and then try the update again.

azca
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

Re: PHP 5 in CentOS 4

Post by azca » 2006/10/20 16:35:40

I used the method described in this link:

http://mirror.centos.org/centos/4/centosplus/Readme.txt

And it worked well for me.

Post Reply

Return to “CentOS 4 - Server Support”