APACHE Compiling Modules (DSO)
Jump to navigation
Jump to search
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