OS환경 : Oracle Linux 7.6 (64bit)
DB 환경 : Oracle Database 19.7.0.0
방법 : Oracle Linux 7.6에 Oracle 19c 설치 가이드
OS 설치는 아래 게시물 참조
Oracle linux 7.6 설치 가이드(https://positivemh.tistory.com/521)
hostname : oel7
DB 설치파일
LINUX.X64_193000_db_home.zip
최신 OPatch 파일
p6880880_190000_Linux-x86-64.zip
패치 파일
p30783543_190000_Linux-x86-64.zip
적용 전 꼭 패치 파일 안에 있는 README 파일을 읽어보길 권장함
p30783543
패치명 | 패치번호 | 패치대상 |
Database Release Update : 19.7.0.0.200414 | 30869156 | DB |
OJVM RELEASE UPDATE: 19.7.0.0.200414 | 30805684 | OJVM |
/etc/hosts 설정
1
2
3
4
|
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.50 oel7 --추가
|
/etc/hostname 확인
1
2
|
# vi /etc/hostname
oel7
|
오라클 설치 전 사전 설정
자동 설정(network)
1
|
# yum -y install oracle-database-preinstall-19c
|
자동 설정 후 수동설정 파일 확인필요
/etc/sysctl.conf에 아래 내용 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
|
잘 입력되었는지 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# /sbin/sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
|
아래 파일 생성 후 내용 추가
1
2
3
4
5
6
7
8
9
|
# vi /etc/security/limits.d/oracle-database-preinstall-19c.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
|
유저 및 그룹 수정
1
|
# usermod -g dba -G dba oracle
|
패스워드 설정
1
|
# passwd oracle
|
selinux permissive 설정
1
2
|
# vi /etc/selinux/config
SELINUX=permissive
|
방화벽 해제
1
2
|
# systemctl stop firewalld
# systemctl disable firewalld
|
설치 경로 생성
1
2
3
4
|
# mkdir -p /ORA19/app/oracle/product/19.0.0/db_1/
# mkdir -p /ORA19/app/oradata
# chown -R oracle:oinstall /ORA19
# chmod -R 775 /ORA19
|
서버에 Oracle Database 설치 미디어 업로드 후 권한 부여
1
2
3
|
# ls -al /ORA19/app/oracle/product/19.0.0/db_1/
-rw-r--r--. 1 oracle oinstall 3059705302 1월 5 17:54 LINUX.X64_193000_db_home.zip
# chown oracle:oinstall LINUX.X64_193000_db_home.zip
|
오라클 계정 접속 후 .bash_profile 에 아래 내용 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# su - oracle
$ vi .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=oel7
export ORACLE_UNQNAME=oracle19
export ORACLE_BASE=/ORA19/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
export ORA_INVENTORY=/ORA19/oraInventory
export ORACLE_SID=oracle19
export DATA_DIR=/ORA19/app/oradata
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=192.168.137.1:0.0
|
오라클 설치파일 압축해제
1
2
|
$ cd $ORACLE_HOME
$ unzip LINUX.X64_193000_db_home.zip
|
Oracle Software 설치
오라클 설치
1
|
$ ./runInstaller
|
Set Up Software Only 선택
Single instance database installation 선택
Enterprise Edition 선택
Oracle base 경로 설정
oraInventory 경로 선택
그룹 권한 선택
./runinstaller 실행후 자동으로 root 스크립트 실행을 위한 root 패스워드 입력(root.sh 등)
사전 요구사항 체크중
Install 선택
설치 중
root 스크립트를 돌리기 전 확인차 물어보는 메세지 Yes 선택
db 소프트웨어(엔진) 설치 완료 Close 선택
리스너 설정
1
|
$ netca
|
Listener configuration 선택
Add 선택
리스너 이름 설정
프로토콜 설정
Use the standard port number of 1521 선택
No 선택
리스너 설정 완료
Finish 선택
OPatch 최신파일 업로드
기존 OPatch 버전 확인
1
2
3
4
|
$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.17
OPatch succeeded.
|
최신 OPatch 파일 업로드
p6880880_190000_Linux-x86-64.zip 미디어 업로드
/app/media
1
2
3
4
5
6
|
$ su - oracle
$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
$ unzip /app/media/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME/
$ ls -al $ORACLE_HOME | grep OPatch
drwxr-x--- 14 oracle dba 4096 Dec 19 00:56 OPatch
drwxr-x---. 14 oracle dba 4096 Apr 23 23:42 OPatch_old
|
Opatch 버전 확인
1
2
3
4
|
$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.19
OPatch succeeded.
|
제일 뒷자리가 17에서 19로 변함
DB 업데이트
기존 패치 내역 확인
1
2
3
4
5
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
OPatch succeeded.
|
OCW와 DB 업데이트가 있음
*OCW : Oracle Clusterware 로 GRID를 사용하지 않는 싱글 환경에서는 업데이트 필요없음
DB 업데이트 폴더로 이동 후 Opatch apply 실행
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
$ cd /app/media/30783543/30869156
$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/19/db_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/19/db_1/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /app/oracle/product/19/db_1/cfgtoollogs/opatch/opatch2020-04-24_00-08-12AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 30869156
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 = '/app/oracle/product/19/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30869156' to OH '/app/oracle/product/19/db_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.sqlj, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.xdk.parser.java.jaxb2, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.rsf, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patching component oracle.rdbms.util, 19.0.0.0.0...
Patching component oracle.assistants.acf, 19.0.0.0.0...
Patching component oracle.assistants.deconfig, 19.0.0.0.0...
Patching component oracle.assistants.server, 19.0.0.0.0...
Patching component oracle.buildtools.rsf, 19.0.0.0.0...
Patching component oracle.ctx, 19.0.0.0.0...
Patching component oracle.ldap.rsf, 19.0.0.0.0...
Patching component oracle.network.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.sdo, 19.0.0.0.0...
Patching component oracle.sqlplus, 19.0.0.0.0...
Patching component oracle.dbjava.ic, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...
Patching component oracle.dbjava.jdbc, 19.0.0.0.0...
Patching component oracle.dbdev, 19.0.0.0.0...
Patching component oracle.network.client, 19.0.0.0.0...
Patching component oracle.xdk.parser.java, 19.0.0.0.0...
Patching component oracle.rdbms.deconfig, 19.0.0.0.0...
Patching component oracle.oracore.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.lbac, 19.0.0.0.0...
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...
Patching component oracle.ons, 19.0.0.0.0...
Patching component oracle.sdo.locator, 19.0.0.0.0...
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...
Patching component oracle.marvel, 19.0.0.0.0...
Patching component oracle.rdbms.install.common, 19.0.0.0.0...
Patching component oracle.install.deinstalltool, 19.0.0.0.0...
Patching component oracle.xdk.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.oci, 19.0.0.0.0...
Patching component oracle.rdbms.drdaas, 19.0.0.0.0...
Patching component oracle.precomp.rsf, 19.0.0.0.0...
Patching component oracle.javavm.client, 19.0.0.0.0...
Patching component oracle.precomp.common.core, 19.0.0.0.0...
Patching component oracle.xdk, 19.0.0.0.0...
Patching component oracle.sqlplus.ic, 19.0.0.0.0...
Patching component oracle.odbc, 19.0.0.0.0...
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...
Patching component oracle.ldap.owm, 19.0.0.0.0...
Patching component oracle.bali.ice, 11.1.1.7.0...
Patching component oracle.ctx.rsf, 19.0.0.0.0...
Patching component oracle.ovm, 19.0.0.0.0...
Patching component oracle.rdbms.rman, 19.0.0.0.0...
Patching component oracle.dbjava.ucp, 19.0.0.0.0...
Patching component oracle.rdbms.dv, 19.0.0.0.0...
Patching component oracle.duma, 19.0.0.0.0...
Patching component oracle.network.listener, 19.0.0.0.0...
Patching component oracle.oraolap, 19.0.0.0.0...
Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...
Patching component oracle.rdbms.crs, 19.0.0.0.0...
Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...
Patching component oracle.precomp.common, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf.core, 19.0.0.0.0...
Patching component oracle.perlint, 5.28.1.0.0...
Patching component oracle.precomp.lang, 19.0.0.0.0...
Patching component oracle.jdk, 1.8.0.201.0...
Patch 30869156 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [30869156].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /app/oracle/product/19/db_1/cfgtoollogs/opatch/opatch2020-04-24_00-08-12AM_1.log
OPatch succeeded.
|
업데이트 결과 확인
1
2
3
4
5
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
OPatch succeeded.
|
DB 업데이트가 19.7이 됨
*OCW : Oracle Clusterware 로 GRID를 사용하지 않는 싱글 환경에서는 업데이트 필요없음
OJVM 업데이트
OJVM 업데이트 폴더로 이동 후 Opatch apply 실행
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
$ cd /app/media/30783543/30805684
$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/19/db_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/19/db_1/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /app/oracle/product/19/db_1/cfgtoollogs/opatch/opatch2020-04-24_00-20-00AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 30805684
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 = '/app/oracle/product/19/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30805684' to OH '/app/oracle/product/19/db_1'
Patching component oracle.javavm.server, 19.0.0.0.0...
Patching component oracle.javavm.server.core, 19.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patch 30805684 successfully applied.
Log file location: /app/oracle/product/19/db_1/cfgtoollogs/opatch/opatch2020-04-24_00-20-00AM_1.log
OPatch succeeded.
|
업데이트 결과 확인
1
2
3
4
5
6
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
OPatch succeeded.
|
DB와 OJVM 업데이트가 모두 19.7이 됨
*OCW : Oracle Clusterware 로 GRID를 사용하지 않는 싱글 환경에서는 업데이트 필요없음
db 생성
db 생성
1
|
$ dbca
|
dbca oui 로딩중
Create a database 선택
Advanced configuration 선택
Custom Database 선택
oracle SID 입력
Use following for the database storage attributes 선택
Next 선택
리스너 선택
모두 체크 해제
Memory 에서 AMM 사이즈는 1024MB 선택
Choose from the list of character sets 는 KO16MSWIN949 선택
Connection mode 는 Dedicated server mode 선택
Sample schemas 는 선택 안함
EM 체크 해제
sys 계정 패스워드 설정
Create database 선택
Finish 선택
db instance 생성중
db 인스턴스 생성 완료
db 설치 후 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 26 02:44:09 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
SQL> select instance_name, version, status from v$instance;
INSTANCE_NAME VERSION STATUS
---------------- ----------------- ------------
ORCL19 19.0.0.0.0 OPEN
|
패치 적용
1
2
|
$ cd $ORACLE_HOME/OPatch
$ datapatch -verbose
|
참조 :
https://positivemh.tistory.com/548
https://positivemh.tistory.com/551
https://positivemh.tistory.com/522
'ORACLE > Install' 카테고리의 다른 글
Oracle 19c Single OPatch Release Update 롤백 가이드 (0) | 2020.06.03 |
---|---|
Redhat Linux 7.5에 Oracle 19c 설치시 compat-libstdc++-33-3.2.3 패키지 (0) | 2020.05.06 |
Oracle 19c SINGLE OPatch Release Update 적용 가이드 (2) | 2020.04.24 |
Oracle Linux 7.6에 Oracle 19c RPM 설치 가이드 (2) | 2020.04.10 |
Oracle Linux 7.6에 Oracle 18c 에서 Oracle 19c로 AutoUpgrade 가이드 (0) | 2020.03.24 |