Usually when we deploy lamp, the HTTPD service is installed, Replacing the default httpd.conf restart httpd service with our httpd.conf may encounter some modules not compiled, the first reaction is to recompile, but Apache is supporting the dynamic expansion module, that is, do not need to recompile the entire Apache, like the PHP Phpize tools, you can compile an extension individually and add it to an existing environment.
1. Download the corresponding HTTPD-X.X.XX source code
2. Installation extension (take Module_file_cache as an example)
The code is as follows |
Copy Code |
#cd Httpd-x.x.xx/modules/cache
#apxs-I-a-c mod_file_cache.c
|
3. Modify the configuration file
The configuration will be modified automatically when the general extension is successful, but we need to confirm that the configuration file is configured correctly, and my test is automatically incremented in the httpd.conf file after 2 is complete:
The code is as follows |
Copy Code |
LoadModule file_cache_module/usr/lib64/httpd/modules/mod_file_cache.so
|
The code is as follows |
Copy Code |
LoadModule File_cache_module modules/mod_file_cache.so
|
The code is as follows |
Copy Code |
#/etc/init.d/httpd restart
|
Also add Mod_mem_cache when prompted
That
The code is as follows |
Copy Code |
#apxs-C-I mod_mem_cache.c
|
The code is as follows |
Copy Code |
mod_mem_cache.so:undefined Symbol:cache_find
|
This is actually the instruction:
The code is as follows |
Copy Code |
#apxs-C-I mod_mem_cache.c cache_cache.c cache_pqueue.c cache_hash.c
|