-1

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.

user119720
  • 390
  • 4
  • 6
  • 20

2 Answers2

0

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.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
K_PL
  • 1
0

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.

Oneiroi
  • 2,063
  • 1
  • 15
  • 28
  • So in short the answer is no is it?Thanks for the answer,although your long answer quite confusing. – user119720 Nov 27 '12 at 03:25
  • @user119720 exactly, the long answer may be confusing however as it states it is possible just not practical. – Oneiroi Nov 27 '12 at 09:45