Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm asking this question out of my curiosity. Is there anyway around to configure apache2 with the php that had been install through yum? Or vice versa? Because based on my self experiences and goggling,we can only install both packages from repo (yum install httpd php) or install both form source on their respective site.

Hope someone can clarify this matter.I really appreciate that.Thanks.

share|improve this question
up vote 0 down vote accepted

Short answer is no:

RPM packages have a requires definition, this is to ensure that all required packages are present prior to installation, yum handels these requires and provides downloads of additional packages.

Long answer:

You can of course circumvent this using the rpm --nodeps option to manually install each rpm package, after a manual download or using a yum utility such as downloadonly.

You then of course have broken dependency chains, updates via yum will fail, or lead to conflicts / broken deployments of dependant packages, you could lead yourself into a complete mess of a system.

In this case if you MUST have a custom apache2 deployment, roll your own RPM and ensure you have the relevant provides section followed by a conflicts: httpd section.

The provides section should mimick those of httpd.

Let me be clear: YOU SHOULD NOT DO THIS

But it is possible.

php-cli / php-fpm option:

IF However you are not installing the php package (which has a requires: httpd), and say perhaps the php-cli package, and compiling apache2 from source again this is possible, and you can use php-fpm to provide the required functionality replacing mod_php.

share|improve this answer
So in short the answer is no is it?Thanks for the answer,although your long answer quite confusing. – user119720 Nov 27 '12 at 3:25
@user119720 exactly, the long answer may be confusing however as it states it is possible just not practical. – Oneiroi Nov 27 '12 at 9:45

First check where apache is installed from package in your distro, then download source, unpack it and do something like:

./configure --prefix=/the/same/patch/as/in/package --with-mpm=worker --with-ssl=/usr/ --with-z=/usr/ --with-apr=/usr/ --with-apr-util=/usr/ --enable-so --enable-rewrite --enable-speling --enable-vhost-alias --enable-dav-fs --enable-dav-lock --enable-cgi --enable-cgid --enable-suexec --enable-info --enable-dav --enable-http --enable-ssl --enable-unique-id --enable-usertrack --enable-ident --enable-headers --enable-expires --enable-mime-magic --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache

./configure --help for more configuration options like configuration files location.

share|improve this answer
this one is for apache that had been installed through yum whereas the php is from the source.Right? – user119720 Nov 27 '12 at 3:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.