환경: CentOS 6.5 (Basic Server, yum groupinstall "Development Tools" 등 기본 라이브러리 설치됨)
httpd-2.4.9 (./configure --enable-module=so --enable-so --enable-mods-shared=ssl --enable-ssl=shared --enable-mods-shared-all --enable-rewrite)
php-5.5.12 (./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql)
1) PHP 소스 디렉토리 ext 폴더에서 아래 명령어 실행 (cf. /php-5.5.12/ext)
# /usr/local/bin/phpize ;
./configure --with-php-config=/usr/local/bin/php-config ;
make ;
make install ;
cp modules/*.so /usr/local/modules/ ;
chown apache:apache /usr/local/modules/* ;
chmod 755 /usr/local/modules/* ;
(위쪽 chown 계정 부분은 httpd 계정으로 설정 (apache 부분))
2) /usr/local/lib/php.ini 에 module 사용 설정
...
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "/usr/local/modules/"
extension = mbstring.so
extension = bz2.so
extension = zip.so
extension = zlib.so
extension = mysqli.so
extension = gd.so
extension = mcrypt.so
extension = gettext.so
extension = sockets.so
...
3) httpd 재기동
service httpd stop
service httpd start