차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| oracle_db_19c_설치_on_rocky_9 [2025/11/19 00:48] – 만듦 koov | oracle_db_19c_설치_on_rocky_9 [2026/07/31 03:21] (현재) – koov | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | ====== Oracle DB 19c 설치 on Rocky 9 ====== | ||
| + | Oracle Database 19c Installation on Rocky Linux 9 | ||
| + | --- // | ||
| + | |||
| + | 이 문서는 '' | ||
| + | 2025-07-11 테스트 되었습니다. | ||
| + | |||
| + | ===== 환경 ===== | ||
| + | OS : '' | ||
| + | DB : '' | ||
| + | |||
| + | ===== 주의사항 ===== | ||
| + | '' | ||
| + | 대표적인 오류는 라이브러리 패키지 없는것과 '' | ||
| + | 이 문제를 해결하기 위해서는 2가지 방법이 있는데 | ||
| + | - 설치를 '' | ||
| + | - '' | ||
| + | |||
| + | 개인적으로는 '' | ||
| + | 딱히 경로에 상관이 없다면 '' | ||
| + | |||
| + | ===== RPM 패키지로 설치하기 ===== | ||
| + | ==== 다운로드 ==== | ||
| + | RPM 패키지 다운로드는 아래 경로에서 다운로드 하도록 한다. | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | 어느 경로에서 다운로드 받아도 상관 없으며 '' | ||
| + | |||
| + | 패키지 다운로드가 완료되었다면 '' | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | '' | ||
| + | * 사용자 추가 | ||
| + | * THP Disable | ||
| + | * limits 설정 | ||
| + | * sysctl 커널 파라메터 설정 | ||
| + | 등을 자동으로 수행해주므로 아주 편리하다. 이 패키지는 '' | ||
| + | |||
| + | ==== 설정 ==== | ||
| + | 패키지를 모두 다운받았다면 설치하기 전에 아래 설정을 수행한다. | ||
| + | * '' | ||
| + | * '' | ||
| + | 두가지 항목 모두 본인이 설정하여 사용하고 싶다면 설정해서 사용해도 되지만 편의를 위해 비활성화 하는것으로 한다. | ||
| + | |||
| + | ==== 설치 ==== | ||
| + | 다운로드 받은 파일 | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | |||
| + | 먼저 '' | ||
| + | 이 작업은 '' | ||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# dnf localinstall oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm | ||
| + | |||
| + | # 설치가 완료된 이후 oracle 계정의 패스워드를 설정하고 리부팅 한다. | ||
| + | [root@oracle1 ~]# passwd oracle | ||
| + | Changing password for user oracle. | ||
| + | New password: | ||
| + | Retype new password: | ||
| + | passwd: all authentication tokens updated successfully. | ||
| + | |||
| + | [root@oracle1 ~]# reboot | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP center round important 60%> | ||
| + | 이 과정에서 패키지 설치 이후 반드시 리부팅을 해줘야 변경사항이 반영되므로 리부팅을 꼭 하고 다음 단계로 진행하도록 한다. | ||
| + | </ | ||
| + | |||
| + | |||
| + | 이후 데이터베이스 패키지를 설치하도록 한다. | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# dnf localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm | ||
| + | Last metadata expiration check: 0:02:06 ago on Fri 11 Jul 2025 05:00:59 PM KST. | ||
| + | Dependencies resolved. | ||
| + | ========================================================================================================================================================== | ||
| + | | ||
| + | ========================================================================================================================================================== | ||
| + | Installing: | ||
| + | | ||
| + | |||
| + | Transaction Summary | ||
| + | ========================================================================================================================================================== | ||
| + | Install | ||
| + | |||
| + | Total size: 2.5 G | ||
| + | Installed size: 6.9 G | ||
| + | Is this ok [y/N]: y | ||
| + | Downloading Packages: | ||
| + | Running transaction check | ||
| + | Transaction check succeeded. | ||
| + | Running transaction test | ||
| + | Transaction test succeeded. | ||
| + | Running transaction | ||
| + | Preparing | ||
| + | Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64 | ||
| + | Installing | ||
| + | Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64 | ||
| + | [INFO] Executing post installation scripts... | ||
| + | [INFO] Oracle home installed successfully and ready to be configured. | ||
| + | To configure a sample Oracle Database you can execute the following service configuration script as root: / | ||
| + | |||
| + | Verifying | ||
| + | |||
| + | Installed: | ||
| + | oracle-database-ee-19c-1.0-1.x86_64 | ||
| + | |||
| + | Complete! | ||
| + | [root@oracle1 ~]# | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 패키지 설치가 완료된 이후 설치할 데이터베이스 설정을 해주도록 한다. | ||
| + | ''/ | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | <WRAP prewrap> | ||
| + | <code vim> | ||
| + | #This is a configuration file to setup the Oracle Database. | ||
| + | #It is used when running '/ | ||
| + | #Please use this file to modify the default listener port and the | ||
| + | #Oracle data location. | ||
| + | |||
| + | # LISTENER_PORT: | ||
| + | LISTENER_PORT=1521 | ||
| + | |||
| + | # ORACLE_DATA_LOCATION: | ||
| + | ORACLE_DATA_LOCATION=/ | ||
| + | |||
| + | # EM_EXPRESS_PORT: | ||
| + | EM_EXPRESS_PORT=5500 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 구성 파일을 수정하였다면 아래 명령어로 설치를 진행한다. | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# / | ||
| + | Configuring Oracle Database ORCLCDB. | ||
| + | Prepare for db operation | ||
| + | 8% complete | ||
| + | Copying database files | ||
| + | 31% complete | ||
| + | Creating and starting Oracle instance | ||
| + | 32% complete | ||
| + | 36% complete | ||
| + | 40% complete | ||
| + | 43% complete | ||
| + | 46% complete | ||
| + | Completing Database Creation | ||
| + | 51% complete | ||
| + | 54% complete | ||
| + | Creating Pluggable Databases | ||
| + | 58% complete | ||
| + | 77% complete | ||
| + | Executing Post Configuration Actions | ||
| + | 100% complete | ||
| + | Database creation complete. For details check the logfiles at: | ||
| + | / | ||
| + | Database Information: | ||
| + | Global Database Name: | ||
| + | System Identifier(SID): | ||
| + | Look at the log file "/ | ||
| + | |||
| + | Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using ' | ||
| + | [root@oracle1 ~]# | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 설치가 완료됐다. | ||
| + | |||
| + | ==== 데이터베이스 확인 ==== | ||
| + | |||
| + | 이제부터는 '' | ||
| + | |||
| + | 먼저 '' | ||
| + | '' | ||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# su - oracle | ||
| + | [oracle@oracle1 ~]$ vim .bashrc | ||
| + | export ORACLE_BASE=/ | ||
| + | export ORACLE_HOME=$ORACLE_BASE/ | ||
| + | export ORACLE_SID=ORCLCDB | ||
| + | export PATH=$ORACLE_HOME/ | ||
| + | |||
| + | # 파일 저장 후 환경 변수를 로딩한다. | ||
| + | [oracle@oracle1 ~]$ source .bashrc | ||
| + | |||
| + | [oracle@oracle1 ~]$ sqlplus / as sysdba | ||
| + | |||
| + | SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 17:38:43 2025 | ||
| + | Version 19.3.0.0.0 | ||
| + | |||
| + | Copyright (c) 1982, 2019, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production | ||
| + | Version 19.3.0.0.0 | ||
| + | |||
| + | SQL> SELECT banner FROM v$version; | ||
| + | |||
| + | BANNER | ||
| + | -------------------------------------------------------------------------------- | ||
| + | Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production | ||
| + | |||
| + | SQL> exit | ||
| + | |||
| + | |||
| + | [oracle@oracle1 ~]$ lsnrctl status | ||
| + | |||
| + | LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 11-JUL-2025 17:42:03 | ||
| + | |||
| + | Copyright (c) 1991, 2019, Oracle. | ||
| + | |||
| + | Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle1)(PORT=1521))) | ||
| + | STATUS of the LISTENER | ||
| + | ------------------------ | ||
| + | Alias | ||
| + | Version | ||
| + | Start Date 11-JUL-2025 17:08:53 | ||
| + | Uptime | ||
| + | Trace Level off | ||
| + | Security | ||
| + | SNMP OFF | ||
| + | Listener Parameter File / | ||
| + | Listener Log File / | ||
| + | Listening Endpoints Summary... | ||
| + | (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle1)(PORT=1521))) | ||
| + | (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) | ||
| + | (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oracle1)(PORT=5500))(Security=(my_wallet_directory=/ | ||
| + | Services Summary... | ||
| + | Service " | ||
| + | Instance " | ||
| + | Service " | ||
| + | Instance " | ||
| + | Service " | ||
| + | Instance " | ||
| + | Service " | ||
| + | Instance " | ||
| + | The command completed successfully | ||
| + | [oracle@oracle1 ~]$ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 설치 종료 | ||
| + | |||
| + | ===== zip 설치 방법 ===== | ||
| + | '' | ||
| + | |||
| + | ==== 다운로드 ==== | ||
| + | '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | '' | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | '' | ||
| + | 다운로드 : https:// | ||
| + | 다운로드 : https:// | ||
| + | |||
| + | |||
| + | '' | ||
| + | 다운로드 : [[https:// | ||
| + | |||
| + | '' | ||
| + | 다운로드 : [[https:// | ||
| + | <WRAP round important 60%> | ||
| + | 위 패치파일은 오라클 정식 서브스크립션이 등록된 계정으로만 다운로드 가능하다. | ||
| + | * 오라클 계정이 없다면 https:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== 설치 ==== | ||
| + | |||
| + | |||
| + | 먼저 '' | ||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# dnf localinstall oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm | ||
| + | [root@oracle1 ~]# passwd oracle | ||
| + | Changing password for user oracle. | ||
| + | New password: | ||
| + | Retype new password: | ||
| + | passwd: all authentication tokens updated successfully. | ||
| + | [root@oracle1 ~]# reboot | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 그리고 오라클 데이터베이스를 설치할 경로를 생성하고 '' | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [root@oracle1 ~]# mkdir -p /app/oracle | ||
| + | [root@oracle1 ~]# chown -R oracle. /app | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이후 '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | 먼저 설치 환경 설정을 아래와 같이 한다고 가정한다. | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * Installation : '' | ||
| + | |||
| + | '' | ||
| + | <WRAP prewrap> | ||
| + | <code vim> | ||
| + | export CV_ASSUME_DISTID=RHEL9 | ||
| + | export ORACLE_BASE=/ | ||
| + | export ORACLE_HOME=$ORACLE_BASE/ | ||
| + | export ORACLE_SID=ORCLCDB | ||
| + | export PATH=$ORACLE_HOME/ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이후 해당 환경변수를 다시 로딩하고 진행한다. | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 ~]$ source .bashrc | ||
| + | [oracle@oracle1 ~]$ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 먼저 '' | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 ~]$ mkdir -p / | ||
| + | [oracle@oracle1 ~]$ cd / | ||
| + | [oracle@oracle1 dbhome_1]$ unzip ~/ | ||
| + | Archive: | ||
| + | | ||
| + | | ||
| + | inflating: drdaas/ | ||
| + | inflating: drdaas/ | ||
| + | inflating: drdaas/ | ||
| + | inflating: drdaas/ | ||
| + | | ||
| + | inflating: drdaas/ | ||
| + | |||
| + | ... 생략 ... | ||
| + | |||
| + | jdk/ | ||
| + | javavm/ | ||
| + | javavm/ | ||
| + | javavm/ | ||
| + | javavm/ | ||
| + | javavm/ | ||
| + | jdk/ | ||
| + | [oracle@oracle1 dbhome_1]$ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 해당 버전에는 버그가 있으므로 이 상태로는 설치가 불가능하다. '' | ||
| + | 일단 기존버전에 존재하는 '' | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 dbhome_1]$ mv OPatch/ OPatch.old | ||
| + | [oracle@oracle1 dbhome_1]$ unzip ~/ | ||
| + | Archive: | ||
| + | | ||
| + | | ||
| + | | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | |||
| + | ... 생략 ... | ||
| + | |||
| + | inflating: OPatch/ | ||
| + | | ||
| + | inflating: OPatch/ | ||
| + | | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | inflating: OPatch/ | ||
| + | [oracle@oracle1 dbhome_1]$ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이제 오라클 데이터베이스의 '' | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 dbhome_1]$ cd | ||
| + | [oracle@oracle1 ~]$ mkdir patch | ||
| + | [oracle@oracle1 ~]$ cd patch | ||
| + | [oracle@oracle1 patch]$ unzip ~/ | ||
| + | |||
| + | ... 생략 ... | ||
| + | |||
| + | inflating: 37641958/ | ||
| + | inflating: 37641958/ | ||
| + | inflating: 37641958/ | ||
| + | inflating: 37641958/ | ||
| + | inflating: 37641958/ | ||
| + | inflating: 37641958/ | ||
| + | inflating: PatchSearch.xml | ||
| + | [oracle@oracle1 patch]$ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이제 준비는 모두 끝났다. | ||
| + | 패치를 포함하여 설치를 시작한다. | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 ~]$ cd / | ||
| + | [oracle@oracle1 dbhome_1]$ ./ | ||
| + | Preparing the home to patch... | ||
| + | Applying the patch / | ||
| + | Successfully applied the patch. | ||
| + | The log can be found at: / | ||
| + | Launching Oracle Database Setup Wizard... | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 위와같이 진행된 이후 설치 GUI 화면이 나타난다. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | <WRAP round important 60%> | ||
| + | 이 과정에서 매우 오랜 시간이 걸린다. 8core 16GB 시스템에서 약 30분이 소요됐다. | ||
| + | </ | ||
| + | |||
| + | {{: | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 ~]$ cd / | ||
| + | [oracle@oracle1 dbhome_1]$ ./ | ||
| + | Preparing the home to patch... | ||
| + | Applying the patch / | ||
| + | Successfully applied the patch. | ||
| + | The log can be found at: / | ||
| + | Launching Oracle Database Setup Wizard... | ||
| + | |||
| + | The response file for this session can be found at: | ||
| + | / | ||
| + | |||
| + | You can find the log of this install session at: | ||
| + | / | ||
| + | Moved the install session logs to: | ||
| + | / | ||
| + | [oracle@oracle1 dbhome_1]$ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 설치가 완료되면 테스트 해보도록 한다. | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | [oracle@oracle1 dbhome_1]$ cd | ||
| + | [oracle@oracle1 ~]$ sqlplus / as sysdba | ||
| + | |||
| + | SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 22:35:08 2025 | ||
| + | Version 19.27.0.0.0 | ||
| + | |||
| + | Copyright (c) 1982, 2024, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production | ||
| + | Version 19.27.0.0.0 | ||
| + | |||
| + | SQL> SELECT banner_full FROM v$version; | ||
| + | |||
| + | BANNER_FULL | ||
| + | -------------------------------------------------------------------------------- | ||
| + | Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production | ||
| + | Version 19.27.0.0.0 | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== 참조링크 ===== | ||
| + | * https:// | ||
| + | * https:// | ||