When configuring the domain name 301 Jump, we find that the MOD_REWRITE.C module is not loaded, so take this as an example.
This is using the Apache extension tool APXS
Before using this feature, verify that the Mod_so module has been loaded by:
[Email protected] ~]#/usr/local/apache2/bin/httpd-l
There is a MOD_SO module in the list listed, which indicates that it is already loaded.
Then find the module's C file under the source package.
[[email protected] ~]# cd /usr/local/src/httpd-2.2.31[[email protected] httpd-2.2.31]# find . -name mod_rewrite.c./modules/mappers/mod_rewrite.c[[email protected] httpd-2.2.31]# cd ./modules/mappers/[[email protected] mappers]# pwd/ usr/local/src/httpd-2.2.31/modules/mappers[[email protected] mappers]# /usr/local/apache2/bin/ Apxs -i -a -c mod_rewrite.c/usr/local/apache2/build/libtool --silent --mode= compile gcc -prefer-pic -dlinux -d_reentrant -d_gnu_source -g - O2 -pthread -i/usr/local/apache2/include -i/usr/local/apache2/include -i /usr/local/apache2/include -c -o mod_rewrite.lo mod_rewrite.c && touch mod_rewrite.slo/usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_rewrite.la &Nbsp;-rpath /usr/local/apache2/modules -module -avoid-version mod_ Rewrite.lo/usr/local/apache2/build/instdso.sh sh_libtool= '/usr/local/apache2/build/libtool ' mod_ rewrite.la /usr/local/apache2/modules/usr/local/apache2/build/libtool --mode=install cp mod_rewrite.la /usr/local/apache2/modules/cp .libs/mod_rewrite.so /usr/local/apache2/modules/ Mod_rewrite.socp .libs/mod_rewrite.lai /usr/local/apache2/modules/mod_rewrite.lacp .libs/mod_ Rewrite.a /usr/local/apache2/modules/mod_rewrite.achmod 644 /usr/local/apache2/modules/mod_ Rewrite.aranlib /usr/local/apache2/modules/mod_rewrite.apath= "$PATH:/sbin" ldconfig -n / Usr/local/apache2/modules----------------------------------------------------------------------libraries have been installed in: /usr/local/apache2/modulesif you ever happen to want to&Nbsp;link against installed librariesin a given directory, libdir, you must either use libtool, andspecify the full 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 - have your system administrator add libdir to '/etc/ld.so.conf ' see any operating system documentation about shared LIBRARIES FORMORE INFORMATION, SUCH AS THE LD (1) and ld.so (8) manual pages.----------------------------------------------------------------------chmod 755 /usr/local/apache2/modules/mod_rewrite.so[activating module ' rewrite ' in /usr/local/ APACHE2/CONF/HTTPD.CONF]
Under:
Libraries has been installed in:
/usr/local/apache2/modules
Know where the module is installed.
This article is from the "Learn Notes for students" blog, please make sure to keep this source http://sanyisheng.blog.51cto.com/11154168/1795806
Lamp--apache Expansion Module Installation