해당버전에 맞는 oracle client rpm 을 다운로드

 

https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

 

Instant Client for Linux x86-64 (64-bit)

Instant Client Installation for Linux x86-64 (64-bit) For general Instant Client information, see the Home Page. ODBC users should follow the ODBC Installation Instructions. Instant Client RPMs are also available without click-through from yum.oracle.com f

www.oracle.com

1. basic

2. devel

3. sqlplus

 

rpm -ivh oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm

rpm -ivh oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm

rpm -ivh oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

 

autoconf 설치를 진행한다

https://smarthink.tistory.com/39

불러오는 중입니다...

 

pecl 에서 oci-8 다운로드

 

1. phpize

2. ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.2/client64/lib

3. ln -s /usr/include/oracle/12.2/client64/ /usr/lib/oracle/12.2/client64/lib/include

4. make && make install

 

php.ini oci8.so 설정

 

oracle instantclient 환경변수 설정

1. splplus 실행을 위한 환경변수 추가

2. vim /etc/profile

3.    export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib

       alias sqlplus='/usr/lib/oracle/11.2/client64/bin/sqlplus'

4. 저장 후 source /etc/profile

 

정상연동 확인 명령어

1. php -r "oci_connect();"

2. 명령어를 잘못사용했단 에러문구가 나오면 정상연결

 

3. splplus  실행 후 정상 접속 명령어 나오면 됨

'기억할것들 > PHP' 카테고리의 다른 글

centos7 php-7 mssql 연결  (0) 2019.12.10
[CSS] 로 문자열 줄임 처리하기  (0) 2018.08.29
php 7.2.8 소스 설치  (0) 2018.08.13
구글 영수증 검증  (0) 2018.07.25

+ Recent posts