How do I enable apache modules from the command line in RedHat?
On Debian/Ubuntu systems I use a2enmod to enable modules from the command line.
Is there an equivalent for RedHat/CentOS type systems?
There is no equivalent.
Debian/Ubuntu butcher the apache configuration into a large number of files, where directories of mods and sites enabled are symlinked to other snippets of configuration files. The a2enmod/a2ensite scripts just manipulate these symlinks.
On redhat systems the apache configuration is by default held in one file /etc/httpd/conf/httpd.conf. All modules are loaded from this file, and can be disabled by commenting out the appropiate LoadModule statement.
What RedHat/CentOS are doing is giving you a pretty stock apache setup, while debian are adding their own "improvements". You could of course use the debian split config system as a template to make your own, and copy the scripts. However, the main argument for the debian setup is so that apache module packages can install their own config files, so without that it's significantly less useful
Edit: If you're looking for an equivalent way of scripting this then i suggest you use /etc/httpd/conf.d directory, any config files in here will be included. Depending on how complicated the script is it might make sense to directly write one line files into conf.d, or use symlinks for more complicated bits.
Typically, on a Redhat system, you'll find a line that looks like this inside
When you copy a configuration file into
Side note: for apache modules like
install modules that you want
for example mod_perl
By default, all mods are loaded when are installed, if you want not load someone