APACHE Compiling Modules (DSO): Difference between revisions
Jump to navigation
Jump to search
m (Michael Kohler moved page APACHE Compiling Modules to APACHE Compiling Modules (DSO) without leaving a redirect) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
=== Quick Compile === | === Quick Compile === | ||
# Compile all modules. | # Compile all modules. | ||
# | #: <tt>'''find . -name '*.c' -exec gcc -fpic -DSHARED_MODULE -I/<path to apache include directory>/include -c {} \;'''</tt> | ||
=== Long Compile === | === Long Compile === | ||
# Compile each module individually. | # Compile each module individually. | ||
# | #: <tt>'''gcc -fpic -DSHARED_MODULE -I/usr/local/apache2/include -c <module>.c'''</tt> | ||
== Linking Modules (DSO) == | == Linking Modules (DSO) == | ||
# Link the object code to a shareable module. | # Link the object code to a shareable module. | ||
# | #: <tt>'''# ld -Bshareable -o <module>.so <module>.o'''</tt> | ||
# Copy the module to the live path of Apache. | # Copy the module to the live path of Apache. | ||
# | #: <tt>'''# cp mod_foo.so /path/to/apache/modules/<module>.so'''</tt> | ||
# Change the permissions of the module. | # Change the permissions of the module. | ||
# | #: <tt>'''# chmod 755 /path/to/apache/modules/<module>.so'''</tt> | ||
== Further Reading == | == Further Reading == |
Latest revision as of 21:08, 13 December 2017
Compiling Modules (DSO)
Quick Compile
- Compile all modules.
- find . -name '*.c' -exec gcc -fpic -DSHARED_MODULE -I/<path to apache include directory>/include -c {} \;
Long Compile
- Compile each module individually.
- gcc -fpic -DSHARED_MODULE -I/usr/local/apache2/include -c <module>.c
Linking Modules (DSO)
- Link the object code to a shareable module.
- # ld -Bshareable -o <module>.so <module>.o
- Copy the module to the live path of Apache.
- # cp mod_foo.so /path/to/apache/modules/<module>.so
- Change the permissions of the module.
- # chmod 755 /path/to/apache/modules/<module>.so