DoubleDBDeep

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

ORACLE/INSTALL

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

DBCAMI 2023. 2. 13. 07:25

나와 같은 초보 오라클 엔지니어들을 위하여 ..

 

  OS / ORACLE ENVIRONMENT
EDITION EE
RAC SINGLE
VERSION ORACLE 12C R2
PATCH 33587128 (12.2.0.1.0)
SERVER Linux 7.9 (5.4.17-2102.201.3.el7uek.x86_64)

 

Media 준비

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

 

https://login.oracle.com:443/oam/server/obrareq.cgi?encquery%3D3faSFgwHT6RyZZYTcciYayPc1oy1tJs5IfTNYCN69KYydR6H5QYHO5S8M5sWAq5%2Bn65eRtANVdJh%2BwneohV9GW2rJitdBiyhHAAXwyAiddJbkn8DIzrTpY1tk7lek3iTpAJs4xpNsVzMmlG8S3Gcf4q%2B7YuPgaz8ZEnxJw2VK8WkZcat%2BPbs9ou6Gl4puG8o9SWKmBiuKIXqZguhy9VEbFw5s8V7gvwpdhcF6fJp6t4s8JdniNxBNFbqiDG%2FPos3I2F2uurcZrQGv73abnO1RYs6V3lekQs10Ykwyenndm11SQfhln5ip%2FGi3sxVGf4KxsDXmyrQWis%2F%2FUoHXSGU2pVDtWnKTEfuFx6IT6OyNzQ%3D%20agentid%3Dedelivery-extprod%20ver%3D1%20crmethod%3D2%26cksum%3D76ce59609ff1fb83986d20510a0d4d46dbe6db64&ECID-Context=1.005x4vo4c0QFo2KimTXvWJ0003PZ004z1J%3BkXjE

 

login.oracle.com:443

- OPatch : support.oracle.com (opatch number : p6880880 / db patch number : p33587128)

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

 

설치

1. OS 환경 셋팅

참조문서

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/ladbi/automatically-configuring-oracle-linux-with-oracle-preinstallation-rpm.html#GUID-22846194-58EF-4552-AAC3-6F6D0A1DF794

-  OS 버전 확인

[root@localhost ~]# cat /etc/oracle-release 
Oracle Linux Server release 7.9
[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)
[root@localhost ~]# uname -r
5.4.17-2102.201.3.el7uek.x86_64

- host 변경

[root@localhost ~]# vi /etc/hosts
----------------------------------------
10.0.2.15       ora12
----------------------------------------

[root@localhost ~]# hostnamectl status
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 65cb9fbb37e04b4c80295ac3fee25d22
           Boot ID: be90778f7488438e8f575eb784c3a5c3
    Virtualization: kvm
  Operating System: Oracle Linux Server 7.9
       CPE OS Name: cpe:/o:oracle:linux:7:9:server
            Kernel: Linux 5.4.17-2102.201.3.el7uek.x86_64
      Architecture: x86-64

[root@localhost ~]# hostnamectl set-hostname ora12

[root@localhost ~]# hostnamectl status
   Static hostname: ora12
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 65cb9fbb37e04b4c80295ac3fee25d22
           Boot ID: be90778f7488438e8f575eb784c3a5c3
    Virtualization: kvm
  Operating System: Oracle Linux Server 7.9
       CPE OS Name: cpe:/o:oracle:linux:7:9:server
            Kernel: Linux 5.4.17-2102.201.3.el7uek.x86_64
      Architecture: x86-64

- Oracle Preinstallation RPM 설치

[root@localhost ~]# yum install oracle-database-server-12cR2-preinstall
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-server-12cR2-preinstall.x86_64 0:1.0-5.el7 will be installed
--> Processing Dependency: ksh for package: oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64
--> Running transaction check
---> Package ksh.x86_64 0:20120801-144.0.1.el7_9 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                                    Arch      Version                      Repository     Size
=======================================================================================================
Installing:
 oracle-database-server-12cR2-preinstall    x86_64    1.0-5.el7                    ol7_latest     19 k
Installing for dependencies:
 ksh                                        x86_64    20120801-144.0.1.el7_9       ol7_latest    882 k
 libaio-devel                               x86_64    0.3.109-13.el7               ol7_latest     12 k

Transaction Summary
=======================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 913 k
Installed size: 3.2 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/libaio-devel-0.3.109-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Public key for libaio-devel-0.3.109-13.el7.x86_64.rpm is not installed
(1/3): libaio-devel-0.3.109-13.el7.x86_64.rpm                                   |  12 kB  00:00:00     
(2/3): oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64.rpm             |  19 kB  00:00:00     
(3/3): ksh-20120801-144.0.1.el7_9.x86_64.rpm                                    | 882 kB  00:00:00     
-------------------------------------------------------------------------------------------------------
Total                                                                  2.4 MB/s | 913 kB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
 Userid     : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03
 Package    : 7:oraclelinux-release-7.9-1.0.9.el7.x86_64 (@anaconda/7.9)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                  1/3 
  Installing : ksh-20120801-144.0.1.el7_9.x86_64                                                   2/3 
  Installing : oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64                            3/3 
  Verifying  : oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64                            1/3 
  Verifying  : ksh-20120801-144.0.1.el7_9.x86_64                                                   2/3 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                  3/3 

Installed:
  oracle-database-server-12cR2-preinstall.x86_64 0:1.0-5.el7                                           

Dependency Installed:
  ksh.x86_64 0:20120801-144.0.1.el7_9               libaio-devel.x86_64 0:0.3.109-13.el7              

Complete!

- 커널파라미터 확인

[root@localhost ~]# 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

// 수정 -> vi /etc/sysctl.conf
[root@localhost ~]# vi /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf 

# oracle-database-server-12cR2-preinstall setting for nofile soft limit is 1024
oracle   soft   nofile    1024

# oracle-database-server-12cR2-preinstall setting for nofile hard limit is 65536
oracle   hard   nofile    65536

# oracle-database-server-12cR2-preinstall setting for nproc soft limit is 16384
# refer orabug15971421 for more info.
oracle   soft   nproc    16384

# oracle-database-server-12cR2-preinstall setting for nproc hard limit is 16384
oracle   hard   nproc    16384

# oracle-database-server-12cR2-preinstall setting for stack soft limit is 10240KB
oracle   soft   stack    10240

# oracle-database-server-12cR2-preinstall setting for stack hard limit is 32768KB
oracle   hard   stack    32768

# oracle-database-server-12cR2-preinstall setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
oracle   hard   memlock    134217728

# oracle-database-server-12cR2-preinstall setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
oracle   soft   memlock    134217728

- Process의 자원 한도 확인 명령어

ulimit -Sn
ulimit -Hn
ulimit -Su
ulimit -Hu
ulimit -Ss
ulimit -Hs
[root@localhost ~]# ulimit -Sn
1024
[root@localhost ~]# ulimit -Hn
4096
[root@localhost ~]# ulimit -Su
31661
[root@localhost ~]# ulimit -Hu
31661
[root@localhost ~]# ulimit -Ss
8192
[root@localhost ~]# ulimit -Hs
unlimited

- Selinux = Permissive 변경

[root@localhost ~]# vi /etc/selinux/config
------------------------------------------------------------
#SELINUX=enforcing
SELINUX=permissive
------------------------------------------------------------
[root@localhost ~]# setenforce permissive //바로 적용

- 프로세스 정리

systemctl stop bluetooth.service
systemctl disable bluetooth.service
systemctl stop firewalld
systemctl disable firewalld
systemctl stop chronyd
systemctl disable chronyd
systemctl stop ntpdate
systemctl disable ntpdate
systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl stop libvirtd
systemctl disable libvirtd.service

- 그룹, 유저 생성 및 패스워드 설정

(preinstallation 시 oracle 계정 및 그룹이 자동 생성되었음 ..!)

[root@localhost ~]# vi /etc/passwd
oracle:x:54321:54321::/home/oracle:/bin/bash

[root@localhost ~]# vi /etc/group
oinstall:x:54321:oracle
dba:x:54322:oracle
oper:x:54323:oracle
backupdba:x:54324:oracle
dgdba:x:54325:oracle
kmdba:x:54326:oracle
racdba:x:54330:oracle

[root@localhost ~]# passwd oracle
Changing password for user oracle.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

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

[root@localhost ~]# mkdir -p /u01/app/oracle/product/12c/dbhome_1
[root@localhost ~]# mkdir -p /media/engine
[root@localhost ~]# mkdir -p /media/patch
[root@localhost ~]# mkdir -p /u01/app/oraInventory
[root@localhost ~]# chown -R oracle:dba /u01
[root@localhost ~]# chmod -R 775 /u01
[root@localhost ~]# chmod -R 775 /media

- .bash_profile 설정

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

export ORACLE_SID=ORA12

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 PATH
export TZ=Asia/Seoul
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12c/dbhome_1

export ORACLE_SID=ORA12

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

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/ora12/ORA12/trace/al*.log'
alias bdump='cd /u01/app/oracle/diag/rdbms/ora12/ORA12/trace'

- GUI 사용을 위한 DISPLAY 변수 설정

[ORA12|root:/root]> echo $DISPLAY
localhost:10.0
[ORA12|root:/root]> xauth
Using authority file /root/.Xauthority         
xauth> list
localhost.localdomain/unix:10  MIT-MAGIC-COOKIE-1  9b250b0d80271f6a4efd22019844773e
ora12/unix:11  MIT-MAGIC-COOKIE-1  196ff02456bcb9060f35a30c6e1ce45d

[ORA12|root:/root]> ora
Last login: Fri Feb 10 14:17:32 KST 2023 on pts/1
[ORA12|oracle:/home/oracle]> echo $DISPLAY
## 결과 없음

[ORA12|oracle:/home/oracle]> xauth add ora12/unix:11  MIT-MAGIC-COOKIE-1  196ff02456bcb9060f35a30c6e1ce45d
xauth:  file /home/oracle/.Xauthority does not exist

--> 이제 .Xauthority 생겼을거임 다시 add

[ORA12|oracle:/home/oracle]> xauth add ora12/unix:11  MIT-MAGIC-COOKIE-1  196ff02456bcb9060f35a30c6e1ce45d
[ORA12|oracle:/home/oracle]> xauth list $DISPLAY
ora12/unix:11  MIT-MAGIC-COOKIE-1  196ff02456bcb9060f35a30c6e1ce45d
[ORA12|oracle:/home/oracle]> echo $DISPLAY

[ORA12|oracle:/home/oracle]> export DISPLAY=192.168.56.1:0.0
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/database]> xhost +

2. 엔진 설치

- scp로 다운받은 media file 전송 (windows -> linux)

// 엔진, OPatch, patch file 3개 전송

// windows cmd

PS C:\Users\CAMI\00_utility\01. linux> cd '.\3. ORACLE\'
PS C:\Users\CAMI\00_utility\01. linux\3. ORACLE> dir


    디렉터리: C:\Users\CAMI\00_utility\01. linux\3. ORACLE


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----      2023-02-10  오전 10:32     3453696911 LINUX.X64_12201_db_home.zip

PS C:\Users\CAMI\00_utility\01. linux\3. ORACLE> scp .\LINUX.X64_12201_db_home.zip oracle@192.168.56.1:/media
oracle@192.168.56.1's password:
LINUX.X64_12201_db_home.zip                                                           100% 3294MB  90.4MB/s   00:36
// 전송 후 확인
[ORA12|oracle:/media/engine]> ls -al
total 3372752
drwxrwxr-x. 2 oracle dba              41 Feb 10 13:42 .
drwxrwxr-x. 4 oracle dba              33 Feb 10 13:42 ..
-rw-r--r--. 1 oracle oinstall 3453696911 Feb 10 13:41 LINUX.X64_12201_db_home.zip
[ORA12|oracle:/media/engine]> cd ..
[ORA12|oracle:/media]> cd patch/
[ORA12|oracle:/media/patch]> ls -al
total 2458488
drwxrwxr-x. 2 oracle dba              87 Feb 10 13:43 .
drwxrwxr-x. 4 oracle dba              33 Feb 10 13:42 ..
-rw-r--r--. 1 oracle oinstall 2393137641 Feb 10 13:44 p33587128_122010_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  124347218 Feb 10 13:42 p6880880_122010_Linux-x86-64.zip

 

- $ORACLE_HOME에 압축 해제

cd /media/engine/
unzip LINUX.X64_12201_db_home.zip -d $ORACLE_HOME

...~~~
   creating: /u01/app/oracle/product/12c/dbhome_1/database/stage/Components/oracle.blaslapack/12.2.0.1.0/1/DataFiles/
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/stage/Components/oracle.blaslapack/12.2.0.1.0/1/DataFiles/filegroup3.jar  
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/stage/shiphomeinfo.properties  
   creating: /u01/app/oracle/product/12c/dbhome_1/database/stage/globalvariables/
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/stage/globalvariables/variable.properties  
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/stage/globalvariables/globalvar.xml  
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/stage/install1.jar  
  inflating: /u01/app/oracle/product/12c/dbhome_1/database/runInstaller  
[ORA12|oracle:/media/engine]>

- 인스톨러 실행

[ORA12|oracle:/home/oracle]> cd $ORACLE_HOME/database
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/database]> ls -al
total 28
drwxr-xr-x.  7 oracle oinstall 4096 Jan 27  2017 .
drwxrwxr-x.  3 oracle dba        22 Feb 10 14:12 ..
drwxr-xr-x.  4 oracle oinstall 4096 Jan 26  2017 install
drwxrwxr-x.  2 oracle oinstall   61 Jan 27  2017 response
drwxr-xr-x.  2 oracle oinstall   35 Jan 26  2017 rpm
-rwxr-xr-x.  1 oracle oinstall 8771 Jan 26  2017 runInstaller
drwxrwxr-x.  2 oracle oinstall   29 Jan 27  2017 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jan 27  2017 stage
-rwxr-xr-x.  1 oracle oinstall  500 Feb  7  2013 welcome.html
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/database]> ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 77649 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-02-10_02-38-18PM. Please wait ...
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/database]>

보안관련 이메일 받을래? no..
소프트웨어 (엔진) 만 설치하겠읍니다.
싱글로 깔겠읍니다.
오라클은 EE지
ORACLE_BASE, ORACLE_HOME 설정
오라클 홈에 .. ! 디렉토리 or 파일이 있어요 . . .@@@

어쩔티비. 무시가능

oracle inventory 설정 - 이 host로는 처음 까시네요 ! 그렇다면 인스톨할 때 나오는 로그들을 오라인벤토리라고 하는데 그 경로 어딜로 하실거에여 ?!?? 서브디렉토리는 제가 알아서 설치해드릴테니 경로만 내노세요 ! 빨리요 ! ! ! 인벤토리 그룹은 누구걸로 할거에요 ? 네 ? ??! !? -> 정말 저는 너무 모든 권한을 dba로 통일할거에요
dba 그들은 막강하다
와 진짜 빨라서 못찍을뻔 << 환경 요구사항들과 내 os 등 깔수있는지 체크중 ~ >>
요약티비 // 오른쪽 하단 response file을 저장 시 이 소프트웨어가 어떻게 깔렸는지 남겨주고 사일런트 모드 설치 시 활용할 수 있음
설치 진..행..중
당신은 터미널에서 루트계정으로 이 스크립트를 돌리는게 좋을것이에요 그리고 ok를 눌러야할 것이에요

[ORA12|root:/root]> /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete.
[ORA12|root:/root]> /u01/app/oracle/product/12c/dbhome_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12c/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] : 
no
Oracle Trace File Analyzer (TFA - User Mode) is available at :
    /u01/app/oracle/product/12c/dbhome_1/suptools/tfa/release/tfa_home/bin/tfactl

OR

Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script :
    /u01/app/oracle/product/12c/dbhome_1/suptools/tfa/release/tfa_home/install/roottfa.sh

설치가 완료되었읍니다.

[ORA12|oracle:/home/oracle]> cd $ORACLE_HOME
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> ls
addnode      ctx          dmu            jdk      odbc         oui       root.sh        sysman
apex         cv           dv             jlib     olap         owm       schagent.conf  ucp
assistants   data         env.ora        ldap     OPatch       perl      scheduler      usm
bin          database     has            lib      opmn         plsql     slax           utl
ccr          dbjava       hs             log      oracore      precomp   sqldeveloper   wwg
cdata        dbs          install        md       oraInst.loc  QOpatch   sqlj           xdk
cfgtoollogs  dc_ocm       instantclient  mgw      ord          R         sqlpatch
clone        deinstall    inventory      network  ordim        racg      sqlplus
crs          demo         javavm         nls      ords         rdbms     srvm
css          diagnostics  jdbc           oc4j     oss          relnotes  suptools

잘 깔렸군요

 

3. 패치

- OPatch 버전업

// 현재
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> opatch version
OPatch Version: 12.2.0.1.6

OPatch succeeded.

// 업글해보자
// 기존 OPatch -> OPatch_old로 변경
[ORA12|oracle:/media/patch]> mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> cd /media/patch/
[ORA12|oracle:/media/patch]> ls
p33587128_122010_Linux-x86-64.zip  p6880880_122010_Linux-x86-64.zip
[ORA12|oracle:/media/patch]> unzip p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME
~~~~
...
  inflating: /u01/app/oracle/product/12c/dbhome_1/OPatch/modules/com.sun.xml.bind.jaxb-xjc.jar  
  inflating: /u01/app/oracle/product/12c/dbhome_1/OPatch/modules/com.oracle.glcm.patch.opatch-common-api-interfaces_13.9.5.0.jar 
[ORA12|oracle:/media/patch]> opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

- 패치 적용

// 현재 패치 확인
[ORA12|oracle:/media/patch]> opatch lspatches
There are no Interim patches installed in this Oracle Home "/u01/app/oracle/product/12c/dbhome_1".

OPatch succeeded.

// 신규 패치파일 압축해제
[ORA12|oracle:/media/patch]> ls
p33587128_122010_Linux-x86-64.zip  p6880880_122010_Linux-x86-64.zip
[ORA12|oracle:/media/patch]> unzip p33587128_122010_Linux-x86-64.zip -d $ORACLE_HOME

// 패치 적용
[ORA12|oracle:/media/patch]> cd $ORACLE_HOME
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> cd 33587128/
[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/33587128]> opatch apply

Patching component oracle.precomp.lang, 12.2.0.1.0...

Patching component oracle.jdk, 1.8.0.91.0...
Patch 33587128 successfully applied.
Log file location: /u01/app/oracle/product/12c/dbhome_1/cfgtoollogs/opatch/opatch2023-02-10_15-56-35PM_1.log

OPatch succeeded.

4. 리스너 생성

// listener.ora 파일 생성 경로 이동
// $ORACLE_HOME/network/admin
/u01/app/oracle/product/12c/dbhome_1/network/admin


[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1/network/admin]> vi listener.ora
----------------------------------------------------------------------------------
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ORA12)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORA12)
      (ORACLE_HOME = /u01/app/oracle/product/12c/dbhome_1)
      (SID_NAME = ORA12)
    )
)
----------------------------------------------------------------------------------
System parameter file is /u01/app/oracle/product/12c/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ora12/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora12)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ORA12)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                13-FEB-2023 06:46:00
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12c/dbhome_1/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)))
Services Summary...
Service "ORA12" has 1 instance(s).
  Instance "ORA12", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

5. Database 생성 (DBCA)

[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> dbca

데이터베이스 생성
설정 고도화 ..!!!!
싱글, 일반목적 설치
DB NAME, SID 설정 및 CONTAINER DB로 생성할 것인지 ? NONO
파일시스템으로 만들것이고 경로를 직접 지정 / 리두로그 및 컨트롤파일 다중화 설정 등
FRA 사용 / 아카이브 모드 사용 X
생성한 리스너 선택
메모리설정 / 추후 parameter로 조절 가능
마찬가지로 추후 설정 가능 . .
캐릭터셋은 추후 변경하면 문제가 될 수 있으니 본인환경 및 목적에 맞게어떤거 사용할지 반드시 잘 선택해야함.
전용서버 사용

 

원하는 사람은 체크 / 나중에 따로 받기도 가능 (oracle sample schema github)
EM (db 관리 툴)
모든 계정에 같은 비번 설정

DBT-06208 오라클 표준 비밀번호 요구사항에 적합하지가 않은뎁쇼 계속할깝쇼 ? ? ? ? ?

례 .

 

데이터베이스 생성 및 SCRIPT 생성 ,경로 설정 / CUSTOMIZE STORAGE LOCATIONS으로 파일 경로 설정 가능 -> 난 귀찮아서 안함
당신의 DB가 이렇게 생성될 것입니다 . ... . / SAVE RESPONSEFILE 선택 시 사일런트모드로 현재 DB와 동일하게 생성할 수 있는 rsp 파일을 만들어줌
설치 레스고

로그볼텨?

[ORA12|oracle:/home/oracle]> tail -50f /u01/app/oracle/cfgtoollogs/dbca/ORA12/trace.log_2023-02-13_06-46-44-AM

끗!

 

확인 및 db 접속 

[ORA12|oracle:/u01/app/oracle/product/12c/dbhome_1]> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 13 07:14:07 2023

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter db_name

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_name 			     string	 ORA12

SQL> select instance_name, status from v$instance ;

INSTANCE_NAME	 STATUS
---------------- ------------
ORA12		 OPEN

// 버전 확인
SQL> set linesize 200
SQL> select * from v$version ;

BANNER										     CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production		  0
PL/SQL Release 12.2.0.1.0 - Production							  0
CORE	12.2.0.1.0	Production								  0
TNS for Linux: Version 12.2.0.1.0 - Production						  0
NLSRTL Version 12.2.0.1.0 - Production							  0

// 패치 확인
SQL> select PATCH_ID,VERSION,ACTION,STATUS from dba_registry_sqlpatch ;

  PATCH_ID VERSION		ACTION		STATUS
---------- -------------------- --------------- -------------------------
  33587128 12.2.0.1		APPLY		SUCCESS

 

728x90