Apache Expansion Module Installation

Source: Internet
Author: User

Because of the requirements, so I want to install an extension module, the extension module named Mod_headers, how should I add the extension module?

First, the tool to add the extension module is:/USR/LOCAL/APACHE2/BIN/APXS

In the directory under the Apache installation path.

First, go to the source package directory you downloaded. is when you first started installing Apache (./configure), the source package to see where you put, generally in the/usr/local/src/directory

#cd/usr/local/usr/

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8B/FA/wKioL1heUnvzbxetAACo016qs3Y925.png-wh_500x0-wm_3 -wmp_4-s_1557197868.png "title=" Clipboard.png "alt=" Wkiol1heunvzbxetaaco016qs3y925.png-wh_50 "/>

Where do I find the mod_headers.c file in the current directory?

#find/usr/local/src/httpd-2.2.31-name "*.C" | grep ' MOD_HEADERS.C '

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8B/FA/wKioL1heUpay_zXXAACLm284Ikw718.png-wh_500x0-wm_3 -wmp_4-s_1749679801.png "title=" Clipboard.png "alt=" Wkiol1heupay_zxxaaclm284ikw718.png-wh_50 "/>

#cd Modules

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8B/FE/wKiom1heUrOiSxtGAAA4r0JQj8I366.png-wh_500x0-wm_3 -wmp_4-s_3649539621.png "title=" Clipboard.png "alt=" Wkiom1heuroisxtgaaa4r0jqj8i366.png-wh_50 "/>

#cd metadata

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/FA/wKioL1heUsmS7tYxAACh_XBhFr4943.png-wh_500x0-wm_3 -wmp_4-s_327563741.png "title=" Clipboard.png "alt=" Wkiol1heusms7tyxaach_xbhfr4943.png-wh_50 "/>

Under this directory, execute the installation command:

#/usr/local/apache2/bin/apxs-i-a-c MOD_HEADERS.C

[Email protected] metadata]# /usr/local/apache2/bin/apxs-i-a-c mod_headers.c

/usr/local/apache2/build/libtool--silent--mode=compile Gcc-prefer-pic-dlinux-d_reentrant-d_gnu_source-d_ Largefile64_source-g-o2-pthread-i/usr/local/apache2/include-i/usr/local/apache2/include-i/usr/local/apache2/ Include-c-o mod_headers.lo mod_headers.c && Touch Mod_headers.slo

/usr/local/apache2/build/libtool--silent--mode=link Gcc-o mod_headers.la-rpath/usr/local/apache2/modules-module- Avoid-version Mod_headers.lo

/usr/local/apache2/build/instdso.sh sh_libtool= '/usr/local/apache2/build/libtool ' mod_headers.la/usr/local/ Apache2/modules

/usr/local/apache2/build/libtool--mode=install CP mod_headers.la/usr/local/apache2/modules/

CP. libs/mod_headers.so/usr/local/apache2/modules/mod_headers.so

CP. libs/mod_headers.lai/usr/local/apache2/modules/mod_headers.la

CP. LIBS/MOD_HEADERS.A/USR/LOCAL/APACHE2/MODULES/MOD_HEADERS.A

chmod 644/USR/LOCAL/APACHE2/MODULES/MOD_HEADERS.A

Ranlib/usr/local/apache2/modules/mod_headers.a

Path= "$PATH:/sbin" Ldconfig-n/usr/local/apache2/modules

----------------------------------------------------------------------

Libraries has been installed in:

/usr/local/apache2/modules

If you ever happen to want to link against installed libraries

In a given directory, Libdir, you must either use Libtool, and

Specify the pathname of the library, or use the '-llibdir '

Flag during linking and do at least one of the following:

-Add Libdir to the ' Ld_library_path ' environment variable

During execution

-Add Libdir to the ' Ld_run_path ' environment variable

During linking

-Use the '-WL,--RPATH-WL,LIBDIR ' linker flag

-Your system administrator add Libdir to '/etc/ld.so.conf '

See all operating system documentation about GKFX libraries for

More information, such as the LD (1) and ld.so (8) manual pages.

----------------------------------------------------------------------

chmod 755/usr/local/apache2/modules/mod_headers.so

[Activating module ' headers ' in/usr/local/apache2/conf/httpd.conf]

-C: Compiling

-I: Installation

-A: Ifmodule information is automatically added to the configuration file. (Configuration file:/usr/local/apache2/conf/httpd.conf)

#cat/usr/local/apache2/conf/httpd.conf | grep ' LoadModule '

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8B/FA/wKioL1heUubiEGM7AABXkR6qCK0282.png-wh_500x0-wm_3 -wmp_4-s_1317569760.png "title=" Clipboard.png "alt=" Wkiol1heuubiegm7aabxkr6qck0282.png-wh_50 "/>

To see if the installation was successful:/usr/local/apache2/bin/apachectl-m

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8B/FE/wKiom1heUvzSnKu5AAA_wxn-Hxo254.png-wh_500x0-wm_3 -wmp_4-s_2394629801.png "title=" Clipboard.png "alt=" Wkiom1heuvzsnku5aaa_wxn-hxo254.png-wh_50 "/>


This article from the "11842333" blog, reproduced please contact the author!

Apache Expansion Module Installation

Related Article

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.