2011. 4. 18. 14:22

[CENT OS 5.5] php 5.3.6 설치(oracle 11g)


다운로드
http://php.net/downloads.php

압축풀기
tar -zxvf php-5.3.6.tar.gz

설치전 프로파일 수정

.profile 예제
ORACLE_HOME=/oracle/11g;export ORACLE_HOME;
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/instantclient;export LD_LIBRARY_PATH



오라클 11g 설정 config 스크립트

위의 첫번째에서 4번째까지 자기 설정에 맞게 변경해줘함.

./configure --with-apache-install=/usr/local/apache2 \
 --prefix=/usr/local/php \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --with-config-file-path=/usr/local/apache2/conf \
 --with-oci8=/oracle/11g \
 --without-mysql \
 --with-gd \
 --with-jpeg-dir=/usr/lib \
 --with-png-dir=/usr/lib \
 --with-gif-dir=/usr/lib \
 --with-tiff-dir=/usr/lib \
 --with-freetype-dir=/usr/include/freetype2 \
 --with-zlib-dir=/usr/lib \
 --enable-gd-native-ttf \
 --enable-freetype-4bit-antialias-hack \
 --with-language=korean \
 --with-charset=euc_kr \
 --enable-modules=so \
 --enable-sigchild \
 --disable-debug


mysql 설정용  == 테스트 안해봄
# ./configure --with-apache-install=/usr/local/apache \
 --with-apxs2=/usr/local/apache/bin/apxs \
 --with-config-file-path=/usr/local/apache/conf \
 --with-mysql=/usr/local/mysql \
 --with-gd \
 --with-jpeg-dir=/usr/lib \
 --with-png-dir=/usr/lib \
 --with-gif-dir=/usr/lib \
 --with-tiff-dir=/usr/lib \
 --with-freetype-dir=/usr/include/freetype2 \
 --with-zlib-dir=/usr/lib \
 --enable-gd-native-ttf \
 --enable-freetype-4bit-antialias-hack \
 --with-language=korean \
 --with-charset=euc_kr \
 --enable-modules=so \
 --enable-sigchild \
 --disable-debug
# make; make install

php.ini 파일 apache 폴더로 복사


5.3.6 버전 호환되었으며 utf-8용 /기본 폴더는 apache2/htdocs로 되어 있습니다.

아파치 서비스 재시작

#service apachectl restart

참조링크

http://www.linux.co.kr/blog2/acacia07/entry/php-oracle-%EC%97%B0%EB%8F%99