오라클/참고

오라클 ADG 설치 1

Manly 2023. 1. 4. 14:19
반응형

OS환경 : Oracle Linux 8.4 (64bit)

 

DB 환경 : Oracle Database 19.12.0.0 ADG

 

방법 : Oracle Linux 8.4에 Oracle 19c ADG 설치 가이드_Part 1

OS 설치는 아래 게시물 참조
Oracle Linux 8.4 설치 가이드(https://positivemh.tistory.com/761)
hostname 변경해야함
 
1번 노드(Active) hostname : oel19adg1, db_name : ORAADG, db_unique_name : ORAADG
2번 노드(Standby) hostname : oel19adg2, db_name : ORAADG, db_unique_name : ORAADGDR

 

*본문에 2번노드 표시가 없으면 모두 1번노드에서 작업

 

 

설치파일은 아래 3가지 파일을 이용함(RAC 구성 할때 받아놓은 패치파일 중 grid 패치파일만 빼고 사용함)

DB : LINUX.X64_193000_db_home.zip
OPatch : p6880880_190000_Linux-x86-64.zip(12.2.0.1.27)

RU : p32900083_190000_Linux-x86-64.zip

Patch 32900083 - Combo of OJVM Component Release Update 19.12.0.0.210720 + Grid Infrastructure Jul 2021 Release Update 19.12.0.0.210720

 ㄴ Patch 32895426 - Database Grid Infrastructure Jul 2021 Release Update 19.12.0.0.210720

 ㄴ Patch 32876380 - Oracle JavaVM Component Release Update 19.12.0.0.210720

 

 

하드웨어 설정

Oracle Linux 8.4 설치 가이드를 보고 설치한 경우

OEL8.4 폴더에 설치했을텐데

OEL8.4+19120_ADG라는 폴더를 하나 만들어서 그안에 폴더를 통째로 이동시켜줌

OEL8.4 폴더는 oel19adg1로 폴더명을 변경시켜줌

 

 

.vmx파일을 실행하면 vmware가 실행됨

 

 

Edit virtual machine settings 선택

 

 

메모리 8gb로 수정(4gb도 가능)

 

 

Processors 2, 2로 변경(1, 1도 가능)

 

 

Options 선택 후 vm 이름 변경

 

 

OS 기동

 

 

기동 시 아래 메세지 발생 시 I copied it 선택

 

 

OS 설정

노드1 OS 기동 후
/etc/hostname 확인

1
2
# cat /etc/hostname
oel19adg1

 

 

기존에 다른 hostname이라면 hostname 변경 후 재기동

1
2
# hostnamectl set-hostname oel19adg1
# reboot

 

 

Network 설정

1
2
3
4
5
Public network(ens32)
IP/Netmask/GW
192.168.137.10/255.255.255.0/192.168.137.2 --노드1
192.168.137.20/255.255.255.0/192.168.137.2 --노드2
DNS 168.126.63.1

 

 

Network 설정(GUI)

OS 기동 후 root 유저 접속 후 우측 상단 전원버튼 선택 후 설정 버튼 선택

 

 

ens32의 설정버튼 선택

 

 

IPv4로 이동

 

 

Address를 192.168.137.10으로 변경 후 Apply

 

 

네트워크 OFF

 

 

네트워크 ON 후 설정 확인

 

 

IP가 정상적으로 변경되어있음

 

 

네트워크 설정 후 확인

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
# ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.137.10  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::20c:29ff:feaf:df45  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:af:df:45  txqueuelen 1000  (Ethernet)
        RX packets 494  bytes 147514 (144.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 570  bytes 86249 (84.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 195  bytes 19688 (19.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 195  bytes 19688 (19.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:16:29:15  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

 

/etc/hosts 설정, 아래 내용 추가 후 저장

1
2
3
4
5
# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.10 oel19adg1
192.168.137.20 oel19adg2

 

 

오라클 설치 전 사전 설정

자동 설정

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
# yum install -y oracle-database-preinstall-19c
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                         43 MB/|  43 MB     00:01    
Oracle Linux 8 Application Stream (x86_64)                                                                                    50 MB/|  32 MB     00:00    
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)                                                    59 MB/|  40 MB     00:00    
Last metadata expiration check: 0:00:05 ago on Mon 28 Mar 2022 04:48:23 PM KST.
Dependencies resolved.
=============================================================================================================================================================
 Package                                       Architecture          Version                                          Repository                        Size
=============================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                x86_64                1.0-2.el8                                        ol8_appstream                     31 k
Installing dependencies:
 ksh                                           x86_64                20120801-254.0.1.el8                             ol8_appstream                    927 k
 libaio-devel                                  x86_64                0.3.112-1.el8                                    ol8_baseos_latest                 19 k
 libnsl                                        x86_64                2.28-151.0.1.el8                                 ol8_baseos_latest                102 k
 lm_sensors-libs                               x86_64                3.4.0-23.20180522git70f7e08.el8                  ol8_baseos_latest                 59 k
 sysstat                                       x86_64                11.7.3-6.0.1.el8                                 ol8_appstream                    425 k
 
Transaction Summary
=============================================================================================================================================================
Install  6 Packages
 
Total download size: 1.5 M
Installed size: 5.0 M
Downloading Packages:
(1/6): libaio-devel-0.3.112-1.el8.x86_64.rpm                                                                                 249 kB/|  19 kB     00:00    
(2/6): ksh-20120801-254.0.1.el8.x86_64.rpm                                                                                    14 MB/| 927 kB     00:00    
(3/6): oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm                                                                   2.0 MB/|  31 kB     00:00    
(4/6): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm                                                             22 kB/|  59 kB     00:02    
(5/6): libnsl-2.28-151.0.1.el8.x86_64.rpm                                                                                     37 kB/| 102 kB     00:02    
(6/6): sysstat-11.7.3-6.0.1.el8.x86_64.rpm                                                                                   131 kB/| 425 kB     00:03    
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        460 kB/| 1.5 MB     00:03     
warning: /var/cache/dnf/ol8_baseos_latest-e4c6155830ad002c/packages/libaio-devel-0.3.112-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                        1.5 MB/| 3.1 kB     00:00    
Importing GPG key 0xAD986DA3:
 Userid     : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 Fingerprint: 76FD 3DB1 3AB6 7410 B89D B10E 8256 2EA9 AD98 6DA3
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                     1/1 
  Installing       : ksh-20120801-254.0.1.el8.x86_64                                                                                                     1/6 
  Running scriptlet: ksh-20120801-254.0.1.el8.x86_64                                                                                                     1/6 
  Installing       : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                              2/6 
  Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                              2/6 
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
 
  Installing       : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                     3/6 
  Running scriptlet: sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                     3/6 
  Installing       : libnsl-2.28-151.0.1.el8.x86_64                                                                                                      4/6 
  Installing       : libaio-devel-0.3.112-1.el8.x86_64                                                                                                   5/6 
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                     6/6 
  Installing       : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                     6/6 
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                     6/6 
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
 
  Verifying        : libaio-devel-0.3.112-1.el8.x86_64                                                                                                   1/6 
  Verifying        : libnsl-2.28-151.0.1.el8.x86_64                                                                                                      2/6 
  Verifying        : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                              3/6 
  Verifying        : ksh-20120801-254.0.1.el8.x86_64                                                                                                     4/6 
  Verifying        : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                     5/6 
  Verifying        : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                     6/6 
 
Installed:
  ksh-20120801-254.0.1.el8.x86_64                               libaio-devel-0.3.112-1.el8.x86_64                      libnsl-2.28-151.0.1.el8.x86_64        
  lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64        oracle-database-preinstall-19c-1.0-2.el8.x86_64        sysstat-11.7.3-6.0.1.el8.x86_64       
 
Complete!

 

 

자동 설정 후 수동설정 파일 확인

/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 (또는 물리메모리 크기의 절반(byte))
kernel.shmmax = 4398046511104 (또는 물리메모리 크기의 절반(byte))
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

위 값은 최소값으로 나의경우 물리메로리를 8GB로 할당했기 때문에 shmall, shmmax를 4294967296(byte) 로 할당함

 

 

잘 입력되었는지 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 4294967296
kernel.shmmax = 4294967296
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

 

 

Shell Limits 설정(안되어있다면 수동삽입)

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(HugePage 사용시 물리메모리의 90% 이상)
oracle   soft   memlock    134217728(HugePage 사용시 물리메모리의 90% 이상)

memlock soft, hard의 경우 HugePage 사용시 물리메모리의 90% 이상을 할당해야함(나의경우 8GB이기 때문에 8GB의 90%인 7916483719987(byte) 로 할당함)

 

 

유저 및 그룹 생성(안되어있다면 수동생성)

1
2
# groupadd dba
# useradd -g dba -G dba oracle

 

 

유저 및 그룹 수정(yum preinstall 이용 자동 생성시)

1
# usermod -g dba -G dba oracle

 

 

패스워드 설정

1
# passwd oracle

 

 

selinux disable 설정

1
2
# vi /etc/selinux/config
SELINUX=disabled

 

 

불필요한 서비스 정지

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
systemctl stop firewalld
systemctl disable firewalld
 
systemctl stop bluetooth
systemctl disable bluetooth
 
systemctl stop chronyd
systemctl disable chronyd
mv /etc/chrony.conf /etc/chrony.conf.bak
 
systemctl stop ntpdate
systemctl disable ntpdate
 
systemctl stop avahi-daemon.socket
systemctl disable avahi-daemon.socket
 
systemctl stop avahi-daemon
systemctl disable avahi-daemon
 
systemctl stop libvirtd
systemctl disable libvirtd

 

 

디렉토리 생성 및 권한부여

1
2
3
4
5
6
#
mkdir -/oracle/media
mkdir -/oracle/app/oracle/product/19c
mkdir -/oracle/oraInventory
chown -R oracle:dba /oracle
chmod -775 /oracle

 

 

/oracle/media 경로에 설치파일 업로드

1
2
3
4
5
6
7
8
# chown -R oracle:dba /oracle/media/
# ls -al /oracle/media/
total 5776568
drwxrwxr-x. 2 oracle dba        123 Mar 28 17:19 .
drwxrwxr-x. 5 oracle dba         50 Mar 28 17:17 ..
-rw-r--r--. 1 oracle dba 3059705302 Mar 28 17:19 LINUX.X64_193000_db_home.zip
-rw-r--r--. 1 oracle dba 2734496202 Mar 28 17:19 p32900083_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle dba  120998448 Mar 28 17:19 p6880880_190000_Linux-x86-64.zip

 

 

오라클 계정 설정 .bash_profile에 아래 내용 추가 후 저장

1
2
3
4
5
6
7
8
9
10
11
# su - oracle
$ vi .bash_profile 
export ORACLE_BASE=/oracle/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/19c;
export ORACLE_SID=ORAADG;
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;
 
alias ss='sqlplus / as sysdba'

 

 

추가 후 적용

1
$ . ./.bash_profile

 

 

※ 여기까지 1번 노드 세팅 완료

2번 노드 생성(복사)

1번노드 종료 후 노드1 폴더 자체를 복사

 

 

복사한 oel19adg1(노드1) -복사본을 oel19adg2(노드2)로 변경

 

 

oel19adg2 폴더로 들어간 뒤 vmx 파일 실행

 

 

oel19adg2의 vmx파일을 열어서 나온 vm에 Edit virtual machine settings 선택

 

 

Network Adapter NAT 선택 후 Advanced 선택

 

 

Generate 선택(MAC Address가 변경됨) 후 OK

 

 

Options 에서 Virtual machine name을 oel19adg1에서 oel19adg2로 변경

 

 

2번노드 oel19adg2 OS 기동

 

 

I copied it 선택

 

 

기동 후 root 로 로그인

 

 

터미널 실행

 

 

2번 노드 아이피 변경, 아이피 제일 뒤 10을 20으로 변경

1
2
# vi /etc/sysconfig/network-scripts/ifcfg-ens32
192.138.137.10 -> 192.138.137.20

 

 

네트워크 재시작 및 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# nmcli con down ens32
# nmcli con up ens32
# systemctl restart NetworkManager.service
# ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.137.20  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::250:56ff:fe20:9267  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:20:92:67  txqueuelen 1000  (Ethernet)
        RX packets 66  bytes 14465 (14.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 81  bytes 11003 (10.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 71  bytes 7648 (7.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 71  bytes 7648 (7.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

 

hostnamectl 명령으로 hostname 변경 oel19adg1-> oel19adg2 후 재기동

1
2
# hostnamectl set-hostname oel19adg2
# reboot

 

 

1번노드, 2번노드 모두 OS 기동 후 ping TEST

1
2
3
4
5
1번 노드(2번노드의 ip로 ping 시도)
# ping oel19adg2
 
2번 노드(1번노드의 ip로 ping 시도)
# ping oel19adg1

 

 

2번노드 오라클 계정 설정(아래 2가지만 1에서 2로 변경)

1
2
3
# su - oracle
$ vi .bash_profile
export ORACLE_SID=ORAADGDR;

 

 

적용

1
$ . ./.bash_profile 
반응형

'오라클 > 참고' 카테고리의 다른 글

오라클 ADG 설치 3  (0) 2023.01.04
오라클 ADG 설치 2  (0) 2023.01.04
오라클 ADG 설치  (0) 2023.01.04
오라클 SID, Service Name  (0) 2022.11.16
물리, 논리적 분류 / 인덱스  (0) 2022.11.16