Install Mod Suexec Centos

Red Hat / CentOS Apache 2 FastCGI PHP Configuration. You will learn about Apache 2 + mod_fastcgi + PHP installation and configuration under Red Hat Enterprise Linux / CentOS Linux version 5.x+. Install mod_fastcgi. [notice] caught SIGTERM, shutting down [Mon Dec 29 23:] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin. Apache and PHP are available in the CentOS base repository, so we can install both software packages with yum. Better use PHP-FPM with suexec instead. Hello every one. New CentOS user here, as well as generally new to linux. I have a question regarding yum and using it to install or remove modules for a package.

Active3 years ago

I have recently installed httpd on a Centos 6 server. From what I see suEXEC was compiled with the values below;

I was wondering if there's a way to change these values without compiling Apache from scratch?

Jeff Schaller
49.5k11 gold badges72 silver badges164 bronze badges
compixtrcompixtr
1301 gold badge2 silver badges11 bronze badges
Centos

1 Answer

It's not possible to augment the options a tool was complied with so you're left to re-compile it yourself if you need additional options added in. With a package like httpd (Apache) on a RedHat based distro this isn't too bad.

You'll essentially need 3 things to do this:

  1. dependencies installed for httpd
  2. source RPM version of httpd
  3. an rpmbuild area

dependencies

You can use the tool yum-builddep to help in the effort. This tool will download all the packages required to build & install a given RPM. So you'll need to get yourself a version of the httpd RPM. But make sure to get it's source version typically named src.rpm files. For example:

source RPM

For CentOS 6.2 you could download this source RPM:- http://vault.centos.org/6.2/os/Source/SPackages/httpd-2.2.15-15.el6.centos.src.rpm

build environment

I typically use a tool to set this up for me, rpmdev-setuptree.

Now change directories to your newly built rpmbuild area, and install the source RPM so that we can begin to modify how it get's built:

How we need to edit the httpd.spec file. This is the file that details how the eventual binary RPM should be constructed:

Mod Suexec

You'll need to find a section in this file where configure is being invoked. I usually search for the string --prefix. This next step is where you can add your modifications which will change how suexec get's built.

excerpt of configure stanza from httpd.spec

Save the file and now you're ready to build your version of httpd.

building source RPM

The following command will build your RPM:

If all goes correctly you should be left with a new version of the RPM in the RPM directory here: RPM/httpd-2.2.15-15.el6.centos.x86_64.rpm.

Now you can install it like any other normal RPM.

References

slmslmInstall Mod Suexec Centos
268k74 gold badges579 silver badges725 bronze badges

Install Mod Suexec Centos 11

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