The root phpize is very similar, you can use APXS for Apache to play modules:
To use APXS, your platform must support DSO features, and Apache must have httpd
built-in Mod_so
modules. Take a look
Httpd-l | grep mod_so
All parameters:
[[Email protected]]# APXS
apxs-g [-S name=value]-n modname
apxs-q [-S name=value] query ...
apxs-c [-S name=value] [-O dsofile] [-I incdir] [-D name=value] [-L-libdir] [-L-libname] [-wc,compiler-flags ] [-wl,linker-flags] files ...
apxs-i [-S name=value] [-N modname] [-a] [-a] dso-file ...
APXS-E [-S name=value] [-N modname] [-a] [-a] dso-file ...
-N ModName
It explicitly sets the module name for the-I (install) and-G (template generation) options. For the-G option, it is required; for the-i option, the APXS tool will determine at least the name of the module by its file name.
-Q
Query for information about a certain APXS setting. The query parameter can be one or more of the following strings: CC, CFLAGS, Cflags_shlib, Includedir, Ld_shlib, Ldflags_shlib, Libexecdir, Libs_shlib, Sbindir, Sysconfdir, TARGET. This parameter is used to manually query for certain settings. For example, to manually process Apache's C header file, you can use it in makefile
-G
This option generates a subdirectory named name (see option-N) and two files in it: One is a boilerplate module source program named MOD_NAME.C, which can be used as a template for building your own modules, or a good starting point for learning to use the APXS mechanism, and the other is the corresponding makefile. Used to compile and install this module.
-C
This option indicates that a compilation operation is required. It first compiles the C source program (. c) files for the corresponding target code file (. o), and then connects the target code with the remaining target code files (. O and. A) in files to generate the dynamic shared object Dsofile. If you do not specify the-o option, this output file name is inferred from the first file name in files, so, by default, it will generally be mod_name.so
-I.
This option indicates the need to perform an installation operation to install one or more dynamic shared objects into the server's modules directory.
-A
This option automatically adds a loadmodule line to the httpd.conf file to activate the module, or, if this line already exists, enables it.
-A
Similar to the-a option, but it adds a loadmodule instruction prefixed by a pound sign (#), that is, the module is ready but is still disabled.
-E
This option indicates that an edit operation is required, which can be used with the-A and-a options, similar to the-I operation, and modifies the Apache httpd.conf configuration file, but does not install this module.
Second, add Apache module
access to the Apache extract directory is the compressed file you downloaded from the Internet, and then unzip the resulting directory .
Directory of CD Apache/modules/proxy
[Email protected]]#/usr/local/apache2/bin/apxs-c-I mod_proxy_balancer.c
The following things appear in the description of the installed.
----------------------------------------------------------------------
Libraries has been installed in:
/usr/local/apache2/modules
#要安装的模块装好了
[[email protected] apache2]$ ls./modules/
Httpd.exp mod_fastcgi.so mod_proxy.so mod_rewrite.so
libphp5.so mod_fcgid.so mod_proxy_balancer.so
mod_cache.so mod_mem_cache.so mod_proxy_http.so
APXS adding Apache Modules