2013년 1월 3일 목요일

아파치 동적 라이브러리 추가

요즈음은 유닉스 시스템의 성능이 좋아져서 아파치 컴파일 시 대부분 --enable-mods-shared=most" --enable-modules=most 를 통해 모든 모듈을 설치하도록 하고 있으나, 때에 따라 이전에 설치한 아파치에 특정 모듈이 빠져있어 재설치를 해야하나 난감해 하는 경우가 있다.
이럴 경우 apxs 유틸을 이용하여 유용하게 해당 모듈만 동적으로 컴파일 할 수 있다.
(Apache 2.0, Apache 2,2 에서 테스트)

* apxs를 이용하여 동적 라이브러리 컴파일 방법
>>     apxs -c "파일명.c"

>> apxs -i -a -c mod_deflate.c
>> apxs -i -a -n depflate(이름) [c 파일의 full 경로]/mod_deflate.c

* 또는
configure / make 단계 까지만 (make install 하지 않음)  정상적으로 수행한 후,
필요한 so 파일의 la 를 apxs 로 등록 한다.

 >> configure --prefix(이하 최초 아파치 컴파일 시와 동일하게 구성한후 --enable-mods-shared=most" --enable-modules=most 를 통해 모든 모듈을 enable )
 >> 이후 apxs -i -a -n depflate(이름) [la 파일의 full 경로]/mod_deflate.la

참고 ) http://prefetch.net/blog/index.php/2005/12/15/unmangling-apxs-and-mod_deflate/

댓글 없음:

댓글 쓰기