DoubleDBDeep

[ORACLE] Oracle Database 12c R1 Single 설치 GUI 모드 본문

ORACLE/INSTALL

[ORACLE] Oracle Database 12c R1 Single 설치 GUI 모드

DBCAMI 2023. 3. 15. 10:18

## 이미 OS user 및 기타 방화벽 설정 등 구축된 상태에서 진행 

## 참조 : https://devcami.tistory.com/28

  OS / ORACLE ENVIRONMENT
EDITION EE
RAC SINGLE
VERSION ORACLE 12C R1
PATCH 34057742 (12.1.0.2.0)
SERVER Linux 7.9 (5.4.17-2102.201.3.el7uek.x86_64)

 

Media 준비

- 엔진 : https://edelivery.oracle.com/osdc/faces/SoftwareDelivery

wget.sh로 엔진 다운받아봄 !

 - Patch Set : support.oracle.com (opatch number : p6880880 / db patch number : 34057742)

--> 가장 최신 release로 받았음

설치

1. OS 환경 셋팅

- host 확인

[ORA12|root:/root]> vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.2.15       ora12

[ORA12|root:/root]> hostname
ora12

- db 엔진 설치 파일 준비

[ORA12|root:/root]> cd /media/engine/
[ORA12|root:/media/engine]> ls -al
total 3372756
drwxrwxr-x. 2 oracle dba              60 Mar 14 20:32 .
drwxrwxr-x. 4 oracle dba              33 Mar 14 20:30 ..
-rw-r--r--. 1 root   root           3111 Mar 14 20:32 12c_wget.sh
[ORA12|root:/media/engine]> chown oracle:dba 12c_wget.sh 
[ORA12|root:/media/engine]> chmod 775 12c_wget.sh 
[ORA12|root:/media/engine]> ora
Last login: Tue Mar 14 19:44:29 KST 2023 on pts/1

[ORA12|oracle:/media/engine]> sh 12c_wget.sh 
SSO User Name: [edelivery 계정]
Password: [edelivery 비번]

-------------------------------------------------------------------------------
### log 확인
[ORA12|root:/media/engine]> ls -al
~~
-rw-r--r--. 1 oracle oinstall     531630 Mar 14 20:49 wgetlog-03-14-23-20:46.log
~~
[ORA12|root:/media/engine]> tail -50f wgetlog-03-14-23-20\:46.log

-------------------------------------------------------------------------------
-rw-r--r--. 1 oracle oinstall 1673544724 Jul 11  2014 V46095-01_1of2.zip
-rw-r--r--. 1 oracle oinstall 1014530602 Jul 11  2014 V46095-01_2of2.zip

sh log

- 사전 OS 설정 (preinstall)

[ORA12|root:/media/engine]> yum install oracle-rdbms-server-12cR1-preinstall -y
Loaded plugins: langpacks, ulninfo
ol7_UEKR4                                                                       | 3.0 kB  00:00:00     
ol7_UEKR6                                                                       | 3.0 kB  00:00:00     
ol7_latest                                                                      | 3.6 kB  00:00:00     
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                                     Arch          Version             Repository         Size
=======================================================================================================
Installing:
 oracle-rdbms-server-12cR1-preinstall        x86_64        1.0-7.el7           ol7_latest         21 k

Transaction Summary
=======================================================================================================
Install  1 Package

Total download size: 21 k
Installed size: 53 k
Downloading packages:
oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64.rpm                       |  21 kB  00:00:06     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64                               1/1 
  Verifying  : oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64                               1/1 

Installed:
  oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7

- 디렉토리 생성 및 권한부여

[ORA121|root:/media/engine]> cd $ORACLE_BASE/product/12c
[ORA121|root:/u01/app/oracle/product/12c]> mkdir ./dbhome_2
[ORA121|root:/u01/app/oracle/product/12c]> chown -R oracle:dba ./dbhome_2
[ORA121|root:/u01/app/oracle/product/12c]> chmod -R 755 ./dbhome_2

- .bash_profile 설정

## root
PATH=$PATH:$HOME/bin

export PATH
export TZ=Asia/Seoul
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12c/dbhome_2

export ORACLE_SID=ORA121

export PATH=$PATH:$ORACLE_HOME/bin:$GRID_HOME/bin

export PS1='[$ORACLE_SID|\u:$PWD]> '
set -o vi
stty erase ^H

alias ss='sqlplus / as sysdba'
alias ob='cd $ORACLE_BASE'
alias oh='cd $ORACLE_HOME'
alias dbs='cd $ORACLE_HOME/dbs'
alias net='cd $ORACLE_HOME/network/admin'
alias ..='. ~/.bash_profile'
alias ...='vi  ~/.bash_profile'
alias ora="su - oracle"

## oracle

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12c/dbhome_2

export ORACLE_SID=ORA121

export PATH=$PATH:$ORACLE_HOME/bin:$GRID_HOME/bin:$ORACLE_HOME/OPatch
export DISPLAY=192.168.56.1:0.0

export PS1='[$ORACLE_SID|\u:$PWD]> '
set -o vi
stty erase ^H

alias ss='sqlplus / as sysdba'
alias ob='cd $ORACLE_BASE'
alias oh='cd $ORACLE_HOME'
alias dbs='cd $ORACLE_HOME/dbs'
alias net='cd $ORACLE_HOME/network/admin'
alias ..='. ~/.bash_profile'
alias ...='vi  ~/.bash_profile'
export NLS_DATE_FORMAT='YYYY/MM/DD HH24:MI:SS'
alias a='tail -50f /u01/app/oracle/diag/rdbms/ora121/ORA121/trace/al*.log'
alias bdump='cd /u01/app/oracle/diag/rdbms/ora121/ORA121/trace'

 

2. 엔진 설치

- 설치파일 압축해제

[ORA121|oracle:/media/engine]> unzip V46095-01_1of2.zip -d $ORACLE_HOME
[ORA121|oracle:/media/engine]> unzip V46095-01_2of2.zip -d $ORACLE_HOME

[ORA121|oracle:/media/engine]> cd $ORACLE_HOME
[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2]> ls
database
[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2]> cd database/
[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2/database]> ls -al
total 28
drwxr-xr-x.  7 oracle oinstall 4096 Jul  7  2014 .
drwxr-xr-x.  3 oracle dba        22 Mar 14 21:30 ..
drwxr-xr-x.  4 oracle oinstall 4096 Mar 14 21:31 install
drwxrwxr-x.  2 oracle oinstall   61 Jul  7  2014 response
drwxr-xr-x.  2 oracle oinstall   34 Jul  7  2014 rpm
-rwxr-xr-x.  1 oracle oinstall 8533 Jul  7  2014 runInstaller
drwxrwxr-x.  2 oracle oinstall   29 Jul  7  2014 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jul  7  2014 stage
-rwxr-xr-x.  1 oracle oinstall  500 Feb  7  2013 welcome.html
[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2/database]> ./runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 57280 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2023-03-14_09-31-55PM. Please wait ...

이메일이나 oracle support로 보안관련 정보 받을텨 ? ㄴㄴ 체크 해제 받을거면 체크혀
너 .. 진자 .. 크리티컬한.. 보안 문제가 있어도 ... 안알려준다.... ? YES ..
소프트웨어만 설치하겠다
싱글로 설치하겠다
영어로 설치하겠다
오 = E 오라클은 EE
ORACLE_BASE, ORACLE_HOME 경로 확인
늬 오라클 홈 안비어있는디 ..? ㄱㅊ아 ..? YES
난. 다른그룹은 필요없어.
사전 요구사항 체크
이렇게 설치한다 ? ㅇㅋ
설 ~ 치 ~ 중
root 계정으로 쉘 돌려주세요

 

2. 리스너 설정

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2/database]> netca

Oracle Net Services Configuration:

Listener 설정
신규생성
리스너명 설정
프로토콜 설정
포트설정
다른 리스너도 설정할래 ? no
끝났단다

Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/12c/dbhome_2/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2/database]> lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 14-MAR-2023 21:44:17

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora12)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                14-MAR-2023 21:43:51
Uptime                    0 days 0 hr. 0 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12c/dbhome_2/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora12/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora12)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

2. DB 생성

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2/database]> dbca

DB생성
고도화모드~!~!~
커스텀 데이터베이스 선택
ORACLE SID (DB NAME) 설정
EM 쓸건지 ㄴㄴ
모든 계정에 동일한 비번 사용 (오류는 비번 권고사항에 안맞다고 알려주는 것 무시가능)
아까 생성한 리스너
datafile 저장되는 위치 설정 및 fra, archive mode 사용 안함
다른건 사용안함
메모리
block size 건들이지않음 / process는 필요한만큼 설정
캐릭터셋 설정
전용서버
데이터베이스 생성
요약
생성중
완료

 

생성확인

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2]> sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 14 22:17:03 2023

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show parameter db_name

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_name 			     string	 ORA121
SQL>

 

3. PATCH

- DB down

SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 14 22:24:53 2023

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

- OPatch upgrade

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2]> opatch version
OPatch Version: 12.1.0.1.3

OPatch succeeded.

[ORA121|oracle:/u01/app/oracle/product/12c/dbhome_2]> cd /media/patch/
[ORA121|oracle:/media/patch]> ls -al
total 6733452
drwxrwxr-x. 2 oracle dba            4096 Mar 14 21:54 .
drwxrwxr-x. 4 oracle dba              33 Mar 14 20:30 ..
-rw-r--r--. 1 oracle dba      1020001457 Feb 10 15:31 p33587128_122010_Linux-x86-64.zip
-rw-r--r--. 1 root   root     5750694672 Mar 14 21:56 p34057742_121020_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  124347218 Feb 10 13:42 p6880880_122010_Linux-x86-64.zip

[ORA121|oracle:/media/patch]> mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
[ORA121|oracle:/media/patch]> unzip p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME

[ORA121|oracle:/media/patch]> opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

- Database Patch

패치파일 unzip

[ORA121|root:/media/patch]> chown oracle:dba ./p34057742_121020_Linux-x86-64.zip 
[ORA121|root:/media/patch]> ora
Last login: Tue Mar 14 21:28:36 KST 2023 on pts/1
[ORA121|oracle:/home/oracle]> cd /media/patch/
[ORA121|oracle:/media/patch]> unzip ./p34057742_121020_Linux-x86-64.zip

패치 적용

[ORA121|oracle:/media/patch]> cd 34057742/
[ORA121|oracle:/media/patch/34057742]> opatch apply
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12c/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/dbhome_2/oraInst.loc
OPatch version    : 12.2.0.1.36
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12c/dbhome_2/cfgtoollogs/opatch/opatch2023-03-14_22-25-42PM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12c/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/dbhome_2/oraInst.loc
OPatch version    : 12.2.0.1.36
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12c/dbhome_2/cfgtoollogs/opatch/opatch2023-03-14_22-26-03PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   19769480  20299023  20831110  21359755  21948354  22291127  23054246  24006101  24732082  25171037  25755742  26609783  26713565  26925311  27338041  27547329  28259833  28729169  29141015  29494060  29918340  30340202  30700212  31113348  31550110  31985579  32328635  32768233  33128590  33477199  33711081  34057742  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12c/dbhome_2')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '19769480' to OH '/u01/app/oracle/product/12c/dbhome_2'

~~~~~~

Composite patch 34057742 successfully applied.

패치 확인

[ORA121|oracle:/media/patch/34057742]> opatch lspatches
34057742;Database Patch Set Update : 12.1.0.2.220719 (34057742)

OPatch succeeded.

 

728x90