When we deploy LAMP, we usually install the httpd service and use the httpd. replace the default httpd with conf. conf may encounter some uncompiled modules when the httpd service is restarted. The first reaction is to re-compile the modules, but apache supports dynamic extension modules. That is to say, you do not need to re-compile the entire apache, just like the PHP phpize tool, you can compile an extension separately and add it to an existing environment.
Procedure:
1. Download the corresponding httpd-x.x.xx source code
2. Install the extension (take module_file_cache as an example)
# Cd httpd-x.x.xx/modules/cache
# Apxs-I-a-c mod_file_cache.c
3. modify the configuration file
Generally, the configuration will be automatically modified after the extension is installed successfully, but we need to check whether the configuration file is correctly configured. After 2 is completed, the httpd. conf file is automatically added:
LoadModule file_cache_module/usr/lib64/httpd/modules/mod_file_cache.so
It can be changed:
LoadModule file_cache_module modules/mod_file_cache.so
4. Restart httpd
#/Etc/init. d/httpd restart
Prompt when mod_mem_cache is added
That is:
# Apxs-c-I mod_mem_cache.c
Mod_mem_cache.so: undefined symbol: cache_find
In fact, the command is as follows:
# Apxs-c-I mod_mem_cache.c cache_cache.c cache_pqueue.c cache_hash.c