Page 1 of 1

How to build custom PHP RPMs

Posted: Tue Sep 05, 2006 2:32 pm
by jason|xoxide
Here's a question... How exactly do you build the RPMs you make available?

I'm in a situation where I'm going to need to install about a dozen copies of PHP but I need memcache support. I'm also going to be installing on a 64-bit version of RHEL (or CentOS, I'm not sure yet), so I can't even use your RPMs without memcache. I'd like to be able to not have to compile on each install so I can get this done relatively quickly...

Is it possible for you to give me a quick run through so I can build the RPMs that I need?

Posted: Tue Sep 05, 2006 2:40 pm
by scott
Im using a modified version of DAR that allows me to build for multiple distros at once. Probably overkill unless you're running your own archive.

The short version:

get a box
install everything (its usually an option)
build

Thats it!

Posted: Tue Sep 05, 2006 5:13 pm
by jason|xoxide
It's those last two steps that I'm not quite firm on. I was planning on setting up a VPS on one of my servers here in the office to build the packages so that it wouldn't interfere with my main system. What exactly would I need to install to cover any deps? How do I actually build the RPM once I have the source?

In any case, if that's too much detail to go into here, it turns out that this won't be as bad as I thought it would be. It now seems, despite the documentation stating otherwise, that you CAN compile memcache as a loadable module, and I actually found RPMs for 5.1.4 that are for x86_64.

http://www.centos.org/modules/newbb/vie ... ic_id=4274

Posted: Wed Sep 06, 2006 11:40 am
by scott
This is a really really long conversation :P Save yourself a great many hours of time, and install everything when you set up the box.

Posted: Thu Sep 07, 2006 3:31 am
by Danny
I recently recompile the php4.4.4.src.rpm of Scott.
I install a vmware partition with Fedora Core 2 and all devel packages.

Install the src rpm, got to /usr/src/RPMS/SPECS change config line and preferences in spec and rebuiild the package.

rpmrebuild -ba file.spec

Work ok for me in 4 machines, i change a lot the configure and all work ok. Another simply option is source recompile, but if you have many machines is a hard process.