화요일, 3월 18, 2025
HomeLinuxubuntu Oracle Instant Client 설치하기

ubuntu Oracle Instant Client 설치하기

uBuntu Oracle Instant Client 설치하기

1.oracle client downaload
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

instantclient-basic-linux.x64-12.1.0.2.0.zip
instantclient-sdk-linux.x64-12.1.0.2.0.zip

2.압축 해제 및 디렉토리위치

cd /opt
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip 
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip

3.Oracle 환경 변수 설정

vi /etc/profile 

export OCI_HOME=/opt/instantclient_12_1
export OCI_LIB_DIR=$OCI_HOME
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include
export OCI_VERSION=12
export NLS_LANG=AMERICAN_AMERICA.UTF8
export LD_LIBRARY_PATH=/opt/instantclient_12_1:${LD_LIBRARY_PATH}
export TNS_ADMIN="/opt/instantclient_12_1/network/admin"
export NLS_LANG=KOREAN_KOREA.KO16MSWIN949

source /etc/profile

4.ld에 Oracle Instant Client 라이브러리 설정

echo '/opt/instantclient_12_1' | sudo tee -a /etc/ld.so.conf.d/oracle_instant_client.conf
ldconfig

5.TNS_ADMIN 디렉토리 및 tnsnames.ora 설정

mkdir -p /opt/instantclient_12_1/network/admin

cd $TNS_ADMIN
vi tnsnames.ora

DEV =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS_LIST =
        (ADDRESS_LIST =
          (ADDRESS =(PROTOCOL=TCP)(HOST=192.168.0.40)(PORT=1521)
          )
        )
      )
    )
    (CONNECT_DATA =(SERVICE_NAME=orcl)
    )
  )
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular