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.
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
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.
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.