Linux httpd to add modules to the detailed steps

Source: Internet
Author: User
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.
Operation Steps:
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
Can be modified to:
The code is as follows Copy Code
LoadModule File_cache_module modules/mod_file_cache.so
4. Restart httpd
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.