Add modules to httpd in CentOS

Source: Internet
Author: User

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


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.