Você precisa usar apxs .
apxs is a tool for building and installing extension modules for the Apache HyperText Transfer Protocol (HTTP) server. This is achieved by building a dynamic shared object (DSO) from one or more source or object files which then can be loaded into the Apache server under runtime via the LoadModule directive from mod_so.
Tenho certeza de que há muitos howtos, dependendo do módulo que você deseja instalar.