우분투 리눅스에 오라클 클라이언트 설치(rpm 패키지)

Ubuntu 리눅스에 Oracle Client 설치하기 – rpm 패키지로

작업 환경
* 클라이언트:
os: ubuntu 22.04
IP 주소: 172.30.124.211

오라클 데이터베이스 서버:
OS: Oracle Linux 8
오라클 데이터베이스: oracle 19c 그리드환경
서비스 이름: orcl
SCAN-IP 주소: fox-scan (172.20.124.241, 172.20.124.242, 172.30.124.243)

오라클 클라이언트는 데비안 패키지 배포는 지원하지 않으므로, rpm 패키지나 tar 파일을 받아서 설치해야한다.
여기서는 rpm 패키지를 alien 명령으로 설치하도록 한다.

1. 오라클 사이트에서 아래 rpm 패키지를 다운로드한다.

oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm    
oracle-instantclient-devel-21.13.0.0.0-1.el8.x86_64.rpm    
oracle-instantclient-sqlplus-21.13.0.0.0-1.el8.x86_64.rpm

sql 명령을 클라이언트측에서 직접 사용할 필요가 없다면 마지막 패키지는 설치하지 않아도 된다.

2. alien 명령으로 위 패키지들을 설치한다.

alien 명령어가 없으면, 아래 명령으로 설치한다.

$ sudo apt install alien

다운로드한 패키지를 설치한다.

$ sudo alien -i --script oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm

warning: oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
warning: oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
...

warning: oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
        dpkg --no-force-overwrite -i oracle-instantclient-basic_21.13.0.0.0-2_amd64.deb
(Reading database ... 128188 files and directories currently installed.)
Preparing to unpack oracle-instantclient-basic_21.13.0.0.0-2_amd64.deb ...
Unpacking oracle-instantclient-basic (21.13.0.0.0-2) over (21.13.0.0.0-2) ...
Setting up oracle-instantclient-basic (21.13.0.0.0-2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
$ sudo alien -i --script oracle-instantclient-sqlplus-21.13.0.0.0-1.el8.x86_64.rpm
warning: oracle-instantclient-sqlplus-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
warning: oracle-instantclient-sqlplus-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
...
        dpkg --no-force-overwrite -i oracle-instantclient-sqlplus_21.13.0.0.0-2_amd64.deb
Selecting previously unselected package oracle-instantclient-sqlplus.
(Reading database ... 128255 files and directories currently installed.)
Preparing to unpack oracle-instantclient-sqlplus_21.13.0.0.0-2_amd64.deb ...
Unpacking oracle-instantclient-sqlplus (21.13.0.0.0-2) ...
Setting up oracle-instantclient-sqlplus (21.13.0.0.0-2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
$ sudo alien -i --script oracle-instantclient-devel-21.13.0.0.0-1.el8.x86_64.rpm
warning: oracle-instantclient-devel-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
warning: oracle-instantclient-devel-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
...
warning: oracle-instantclient-devel-21.13.0.0.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
        dpkg --no-force-overwrite -i oracle-instantclient-devel_21.13.0.0.0-2_amd64.deb
Selecting previously unselected package oracle-instantclient-devel.
(Reading database ... 128272 files and directories currently installed.)
Preparing to unpack oracle-instantclient-devel_21.13.0.0.0-2_amd64.deb ...
Unpacking oracle-instantclient-devel (21.13.0.0.0-2) ...
Setting up oracle-instantclient-devel (21.13.0.0.0-2) ...

3. 오라클 클라이언트 설치후, sqlplus 명령으로 오라클 서버 접속확인.

한글 깨짐 방지를 위해 현재 계정에 아래 환경변수 적용한다.

$ export NLS_LANG=KOREAN_KOREA.AL32UTF8

sqlplus 명령으로 데이터베이스 접속 확인.

$ sqlplus fox/fox123@172.30.124.241/orcl

SQL*Plus: Release 21.0.0.0.0 - Production on 금 4월 19 02:23:33 2024
Version 21.13.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

마지막 성공한 로그인 시간: 금 4월  19 2024 02:22:43 +00:00

다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select * from test;

        ID NAME
---------- ----------
         2 snowfox
         1 poss

SQL>

답글 남기기

Your email address will not be published.