본문 바로가기
프로그래밍

centos7 에 oracle 19c - silent 버전 설치하기

by choihyuunmin 2023. 4. 7.
728x90

oracle은 설치시 확인해야 할 게 너무 많다. 그룹 생성, 시스템 config 수정 등등..

postgresql과 비교하면 정말 어렵다.

설치 환경이 GUI를 사용할 수 없는 환경이라 기존 설치 방법이 아닌 silent 모드. 즉, 백그라운드 버전으로 설치를 진행했다.

열심히 삽질 했으니 누군가는 하지 않기를 바라며 포스팅한다.

 

 

 

오라클 다운로드

https://www.oracle.com/kr/database/technologies/oracle-database-software-downloads.html#19c

 

Database Software Downloads | Oracle 대한민국

Oracle Database Express Edition Previous Database Release Software Oracle Database 10.2, 11.x, 12.x, and 18c are available as a media or FTP request for those customers who own a valid Oracle Database product license for any edition. To request access to t

www.oracle.com

 

계정 및 그룹 생성

[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle

 

환경설정

  • 시스템 세팅 
[root@localhost ~]# vi /etc/sysctl.conf

# 시스템 전체에서 열 수 있는 파일 개수
fs.file-max = 6815744
# 배열당 최대 세마포어 수 / 시스템 전체 최대 세마포어 수 / 최대 배열 수
# 오라클 권장 사항
kernel.sem = 250 32000 100 128
# 공유 메모리 세그먼트 수
kernel.shmmni = 4096
# 시스템에서 사용할 수 있는 총 공유 메모리(byte)
kernel.shmall = 1073741824
# 공유 메모리 세그먼트 최대 크기(byte)
# 4GB로 설정했기 때문에 시스템 최소 메모리가 4GB 이상 필수
kernel.shmmax = 4398046511104
# 커널 패닉시 리부팅 횟수
kernel.panic_on_oops = 1
# tcp 수신 버퍼 기본값
net.core.rmem_default = 262144
# tcp 수신 버서 최대값
net.core.rmem_max = 4194304
# tcp 전송 버퍼 기본값
net.core.wmem_default = 262144
# tcp 전송 버퍼 최대값
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

※세마포어란? 공유 메모리와 같은 공유 리소스 사용과정에서 프로세스 동기화를 위해 사용되는 카운터

 

  • oracle 유저 리소스 제한 정보 추가
[root@localhost ~]# vi /etc/security/limits.d/oracle-database-preinstall-19.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

- oracle-database-preinstall-19.conf 파일은 없는 파일이므로 vi로 생성과 동시에 내용을 넣어준다.

 

 

  • host 설정
[oracle@localhost ~]$ echo "192.168.35.24 orcl" >> /etc/hosts

- 본인의 localhost ip와 host명을 넣어준다. /etc/hosts 파일의 맨 하단에 작성한 ip와 host명이 추가된다.

[root@localhost ~]# vi /etc/hostname

orcl

- host명을 위에서 지정한 orcl로 변경해준다.

 

 

  • 방화벽 허용
[root@orcl ~]# firewall-cmd --zone=public --add-port=1521/tcp --add-port=5500/tcp --add-port=5520/tcp --add-port=3938/tcp --permanent
success
[root@orcl ~]# firewall-cmd --reload
success
[root@orcl ~]# firewall-cmd --list-ports
54320/tcp 8629/tcp 9000/tcp 34500/tcp 9001/tcp 3306/tcp 1521/tcp 5500/tcp 5520/tcp 3938/tcp

- 필요한 포트 미리 open

 

 

 

패키지 설치

[root@orcl ~]# yum install ksh libaio-devel compat-libcap1 compat-libstdc++-33 glibc-devel libstdc++-devel gcc-c++

 

 

DB 설치

  • directory 설정
[root@orcl ~]$ mkdir -p /home/app/oracle/product/19.3.0/db_1/
[root@orcl ~]$ mkdir -p /home/app/oradata
[root@orcl ~]$ chown -R oracle:oinstall /home/app
[root@orcl ~]$ chmod -R 775 /home/app
[root@orcl ~]$ chmod -R g+s /home/app

- 설치 경로는 자유. 설치시에 oracle, oradata라는 디렉토리를 두개 생성해줘야 한다.(나중에 엔진 설치 시 사용)

 

  • 환경변수 수정
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=orcl
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/home/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
export ORA_INVENTORY=/app/dbms/oracle/oraInventory
export ORACLE_SID=ORCL
export DATA_DIR=/home/app/oradata
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 NLS_LANG=KOREAN_KOREA.AL32UTF8

- db 설치 및 사용을 oracle 계정이 수행하기 때문에 oracle 계정의 환경변수를 수정해준다. 위에서 설정한 디렉터리 경로를 확인하여 수정해준다.

 

  • db config 수정

config 수정은 항상 백업후에 진행

/home/app/oracle/product/19.3.0/db_1/install/response/db_install.rsp 파일을 수정해준다.

####################################################################
## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file contains plain text passwords and    ##
## should be secured to have read permission only by oracle user  ##
## or db administrator who owns this installation.                ##
##                                                                ##
####################################################################


#------------------------------------------------------------------------------
# Do not change the following system generated value. 
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0

#-------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
#   - INSTALL_DB_SWONLY
#   - INSTALL_DB_AND_CONFIG
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.  
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/home/oraInventory
#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home. 
#-------------------------------------------------------------------------------
ORACLE_HOME=/home/app/oracle/product/19.3.0/db_1

#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base. 
#-------------------------------------------------------------------------------
ORACLE_BASE=/home/app/oracle

#-------------------------------------------------------------------------------
# Specify the installation edition of the component.                     
#                                                             
# The value should contain only one of these choices.  
#   - EE     : Enterprise Edition 
#   - SE2     : Standard Edition 2


#-------------------------------------------------------------------------------

oracle.install.db.InstallEdition=SE2
###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                          #
# ------------------------------------------                                  #
# Provide values for the OS groups to which SYSDBA and SYSOPER privileges     #
# needs to be granted. If the install is being performed as a member of the   #
# group "dba", then that will be used unless specified otherwise below.       #
#                                                                             #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System.                                                           #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# The OSDBA_GROUP is the OS group which is to be granted SYSDBA privileges.
#-------------------------------------------------------------------------------
oracle.install.db.OSDBA_GROUP=dba

#------------------------------------------------------------------------------
# The OSOPER_GROUP is the OS group which is to be granted SYSOPER privileges.
# The value to be specified for OSOPER group is optional.
#------------------------------------------------------------------------------
oracle.install.db.OSOPER_GROUP=oper

#------------------------------------------------------------------------------
# The OSBACKUPDBA_GROUP is the OS group which is to be granted SYSBACKUP privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSBACKUPDBA_GROUP=dba

#------------------------------------------------------------------------------
# The OSDGDBA_GROUP is the OS group which is to be granted SYSDG privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSDGDBA_GROUP=dba

#------------------------------------------------------------------------------
# The OSKMDBA_GROUP is the OS group which is to be granted SYSKM privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSKMDBA_GROUP=dba

#------------------------------------------------------------------------------
# The OSRACDBA_GROUP is the OS group which is to be granted SYSRAC privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSRACDBA_GROUP=dba
################################################################################
#                                                                              #
#                      Root script execution configuration                     #
#                                                                              #
################################################################################

#-------------------------------------------------------------------------------------------------------
# Specify the root script execution mode.
#
#   - true  : To execute the root script automatically by using the appropriate configuration methods.
#   - false : To execute the root script manually.
#
# If this option is selected, password should be specified on the console.
#-------------------------------------------------------------------------------------------------------
oracle.install.db.rootconfig.executeRootScript=

#--------------------------------------------------------------------------------------
# Specify the configuration method to be used for automatic root script execution.
#
# Following are the possible choices:
#   - ROOT
#   - SUDO
#--------------------------------------------------------------------------------------
oracle.install.db.rootconfig.configMethod=
#--------------------------------------------------------------------------------------
# Specify the absolute path of the sudo program.
#
# Applicable only when SUDO configuration method was chosen.
#--------------------------------------------------------------------------------------
oracle.install.db.rootconfig.sudoPath=

#--------------------------------------------------------------------------------------
# Specify the name of the user who is in the sudoers list. 
# Applicable only when SUDO configuration method was chosen.
# Note:For Single Instance database installations,the sudo user name must be the username of the user installing the database.
#--------------------------------------------------------------------------------------
oracle.install.db.rootconfig.sudoUserName=

###############################################################################
#                                                                             #
#                               Grid Options                                  #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# Value is required only if the specified install option is INSTALL_DB_SWONLY
# 
# Specify the cluster node names selected during the installation.
# 
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
#------------------------------------------------------------------------------
oracle.install.db.CLUSTER_NODES=

###############################################################################
#                                                                             #
#                        Database Configuration Options                       #
#                                                                             #
###############################################################################

#-------------------------------------------------------------------------------
# Specify the type of database to create.
# It can be one of the following:
#   - GENERAL_PURPOSE                       
#   - DATA_WAREHOUSE 
# GENERAL_PURPOSE: A starter database designed for general purpose use or transaction-heavy applications.
# DATA_WAREHOUSE : A starter database optimized for data warehousing applications.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.type=

#-------------------------------------------------------------------------------
# Specify the Starter Database Global Database Name. 
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.globalDBName=

#-------------------------------------------------------------------------------
# Specify the Starter Database SID.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.SID=

#-------------------------------------------------------------------------------
# Specify whether the database should be configured as a Container database.
# The value can be either "true" or "false". If left blank it will be assumed
# to be "false".
#-------------------------------------------------------------------------------
oracle.install.db.ConfigureAsContainerDB=

#-------------------------------------------------------------------------------
# Specify the  Pluggable Database name for the pluggable database in Container Database.
#-------------------------------------------------------------------------------
oracle.install.db.config.PDBName=

#-------------------------------------------------------------------------------
# Specify the Starter Database character set.
#                                               
#  One of the following
#  AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
#  EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
#  BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
#  AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
#  IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
#  KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
#  ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.characterSet=

#------------------------------------------------------------------------------
# This variable should be set to true if Automatic Memory Management 
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryOption=

#-------------------------------------------------------------------------------
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available 
# on the system.
# Example: oracle.install.db.config.starterdb.memoryLimit=512
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryLimit=

#-------------------------------------------------------------------------------
# This variable controls whether to load Example Schemas onto
# the starter database or not.
# The value can be either "true" or "false". If left blank it will be assumed
# to be "false".
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.installExampleSchemas=

###############################################################################
#                                                                             #
# Passwords can be supplied for the following four schemas in the             #
# starter database:                                                           #
#   SYS                                                                       #
#   SYSTEM                                                                    #
#   DBSNMP (used by Enterprise Manager)                                       #
#                                                                             #
# Same password can be used for all accounts (not recommended)                #
# or different passwords for each account can be provided (recommended)       #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# This variable holds the password that is to be used for all schemas in the
# starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.ALL=

#-------------------------------------------------------------------------------
# Specify the SYS password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYS=

#-------------------------------------------------------------------------------
# Specify the SYSTEM password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSTEM=

#-------------------------------------------------------------------------------
# Specify the DBSNMP password for the starter database.
# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.DBSNMP=

#-------------------------------------------------------------------------------
# Specify the PDBADMIN password required for creation of Pluggable Database in the Container Database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.PDBADMIN=

#-------------------------------------------------------------------------------
# Specify the management option to use for managing the database.
# Options are:
# 1. CLOUD_CONTROL - If you want to manage your database with Enterprise Manager Cloud Control along with Database Express.
# 2. DEFAULT   -If you want to manage your database using the default Database Express option.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.managementOption=

#-------------------------------------------------------------------------------
# Specify the OMS host to connect to Cloud Control.
# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.omsHost=

#-------------------------------------------------------------------------------
# Specify the OMS port to connect to Cloud Control.
# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.omsPort=

#-------------------------------------------------------------------------------
# Specify the EM Admin user name to use to connect to Cloud Control.
# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.emAdminUser=

#-------------------------------------------------------------------------------
# Specify the EM Admin password to use to connect to Cloud Control.
# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.emAdminPassword=

###############################################################################
#                                                                             #
# SPECIFY RECOVERY OPTIONS                                                    #
# ------------------------------------                                        #
# Recovery options for the database can be mentioned using the entries below  #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# This variable is to be set to false if database recovery is not required. Else 
# this can be set to true.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.enableRecovery=

#-------------------------------------------------------------------------------
# Specify the type of storage to use for the database.
# It can be one of the following:
#   - FILE_SYSTEM_STORAGE
#   - ASM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.storageType=

#-------------------------------------------------------------------------------
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.         
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE 
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

#-------------------------------------------------------------------------------
# Specify the recovery location.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE 
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

#-------------------------------------------------------------------------------
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when oracle.install.db.config.starterdb.storageType=ASM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.diskGroup=

#-------------------------------------------------------------------------------
# Specify the password for ASMSNMP user of the ASM instance.                 
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE 
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.ASMSNMPPassword=

- 여기도 복잡해보이지만, 경로와 user정보만 확인하여 등록해주면 된다.

 

  • 설치전 config 검증
[oracle@orcl response]$ $ORACLE_HOME/runInstaller -silent -responseFile /home/app/oracle/product/19.3.0/db_1/install/response/db_install.rsp -executePrereqs

- 마찬가지로 경로 확인

 

  • swap 메모리 증설
# bs = 블럭사이즈 , count = 증설 메모리 사이즈 bs * count
[root@orcl /]# dd if=/dev/zero of=swapfile bs=1K count=4M
4194304+0 records in
4194304+0 records out
4294967296 bytes (4.3 GB) copied, 17.6157 s, 244 MB/s
[root@orcl /]# chmod 600 /swapfile
[root@orcl /]# mkswap /swapfile 
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=c84cddec-e01e-4d0e-8e9f-e55e221bc0a6
[root@orcl /]# swapon /swapfile 
[root@orcl /]# free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        823M         10G         29M        4.8G         14G
Swap:          5.0G          0B        5.0G

- oracle 설치시 4GB 이상의 swap 메모리 필요. 

 

  • 오라클 db 엔진 설치
[oracle@orcl db_1]$ ./runInstaller -silent -responseFile /home/app/oracle/product/19.3.0/db_1/install/response/db_install.rsp -waitForCompletion
Launching Oracle Database Setup Wizard...

[WARNING] [INS-32047] The location (/home/oraInventory) specified for the central inventory is not empty.
   ACTION: It is recommended to provide an empty location for the inventory.
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2023-04-02_11-58-54PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: installActions2023-04-02_11-58-54PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /home/app/oracle/product/19.3.0/db_1/install/response/db_2023-04-02_11-58-54PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2023-04-02_11-58-54PM/installActions2023-04-02_11-58-54PM.log

As a root user, execute the following script(s):
        1. /home/oraInventory/orainstRoot.sh
        2. /home/app/oracle/product/19.3.0/db_1/root.sh

Execute /home/oraInventory/orainstRoot.sh on the following nodes: 
[orcl]
Execute /home/app/oracle/product/19.3.0/db_1/root.sh on the following nodes: 
[orcl]


Successfully Setup Software with warning(s).
Moved the install session logs to:
 /home/oraInventory/logs/InstallActions2023-04-02_11-58-54PM
[oracle@orcl db_1]$

- 설치를 시작하면, 

As a root user, execute the following script(s):
        1. /home/oraInventory/orainstRoot.sh
        2. /home/app/oracle/product/19.3.0/db_1/root.sh

Execute /home/oraInventory/orainstRoot.sh on the following nodes: 
[orcl]
Execute /home/app/oracle/product/19.3.0/db_1/root.sh on the following nodes: 
[orcl]

위와 같은 로그를 확인할 수 있는데, root 계정으로 접속하여 1. 2. 명령어를 실행해준다.

[root@orcl home]# /home/oraInventory/orainstRoot.sh
Changing permissions of /home/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /home/oraInventory to oinstall.
The execution of the script is complete.
[root@orcl home]# /home/app/oracle/product/19.3.0/db_1/root.sh
Check /home/app/oracle/product/19.3.0/db_1/install/root_orcl_2023-04-03_00-06-39-376579819.log for the output of root script
[root@orcl home]# vi /home/app/oracle/product/19.3.0/db_1/install/root_orcl_2023-04-03_00-06-39-376579819.log for the output of root script

Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /home/app/oracle/product/19.3.0/db_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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.
Oracle Trace File Analyzer (TFA) is available at : /home/app/oracle/product/19.3.0/db_1/bin/tfactl

 

 

  • db 생성
[oracle@orcl ~]$ cd $ORACLE_HOME/assistants/dbca
[oracle@orcl dbca]$ dbca -silent -createDatabase \
>  -templateName General_Purpose.dbc \
>  -gdbname wms -sid wms -responseFile NO_VALUE \
>  -characterSet AL32UTF8 \
>  -sysPassword oracle \
>  -systemPassword oracle \
>  -createAsContainerDatabase false \
>  -numberOfPDBs 0 \
>  -databaseType MULTIPURPOSE \
>  -memoryMgmtType auto_sga \
>  -totalMemory 2200 \
>  -storageType FS \
>  -datafileDestination "/home/app/oradata/" \
>  -redoLogFileSize 50 \
>  -emConfiguration NONE \
>  -ignorePreReqs
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /home/app/oracle/cfgtoollogs/dbca/wms.
Database Information:
Global Database Name:wms
System Identifier(SID):wms
Look at the log file "/home/app/oracle/cfgtoollogs/dbca/wms/wms.log" for further details.

- 명령어에 password, 인코딩 정보등을 명시해서 db를 생성하는 방법. config를 수정하는 방법도 있다.(dbca.rsp 수정)

밑에서 설명

 

 

  • 리스너 생성
[oracle@orcl dbca]cd $ORACLE_HOME/assistants/dbca
# 리스너 상태 확인
[oracle@orcl dbca]lsnrctl status
[oracle@orcl orcl]$ netca -silent -responseFile $ORACLE_HOME/assistants/netca/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/app/oracle/product/19.3.0/db_1/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /home/app/oracle/product/19.3.0/db_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

 

 

  • 리스너 상태 확인
[oracle@orcl orcl]$ lsnrctl status;

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 03-4월 -2023 21:35:46

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

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT=1521)))에 연결되었습니다
리스너의 상태
------------------------
별칭                     LISTENER
버전                     TNSLSNR for Linux: Version 19.0.0.0.0 - Production
시작 날짜                 03-4월 -2023 21:34:46
업타임                   0 일 0 시간. 1 분. 0 초
트레이스 수준            off
보안                     ON: Local OS Authentication
SNMP                     OFF리스너 매개변수 파일   /home/app/oracle/product/19.3.0/db_1/network/admin/listener.ora
리스너 로그 파일         /home/app/oracle/diag/tnslsnr/orcl/listener/alert/log.xml
끝점 요약 청취 중...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
서비스 요약...
"wms" 서비스는 1개의 인스턴스를 가집니다.
  "wms" 인스턴스(READY 상태)는 이 서비스에 대해 1 처리기를 가집니다.
"wmsXDB" 서비스는 1개의 인스턴스를 가집니다.
  "wms" 인스턴스(READY 상태)는 이 서비스에 대해 1 처리기를 가집니다.
명령이 성공적으로 수행되었습니다

 

 

 

 

※ config 파일 수정하여 DB 생성하기

 

[oracle@orcl orcl]$ vi $ORACLE_HOME/assistants/dbca


Global Database Name 설정
gdbName=ORCL.GLOBAL.COM

데이터베이스 SID 설정
sid=ORCL

컨테이너 DB 생성 여부. -> 만약 컨테이너를 사용하여 플러그인 DB로 사용할 경우 YES
createAsContainerDatabase=false

# 생성할 플러그인 데이터베이스 수(Default 0)
# numberOfPDBs=1

# 플러그인 데이터베이스 이름
# pdbName=ORCLPDB

# 플러그인 데이터베이스의 로컬 UNDO 테이블스페이스 사용(Default TRUE) 
# useLocalUndoForPDBs=TRUE

# PDB Administrator 사용자 패스워드
# pdbAdminPassword=*******

#생성할 데이터베이스의 템플릿(Data_Warehouse.dbc  General_Purpose.dbc에 하나)
templateName=General_Purpose.dbc

#SYS 사용자 패스워드
sysPassword=*******

#SYSTEM 사용자 패스워드
systemPassword=*******

#데이타파일위치(Default :  $ORACLE_BASE/oradata )
datafileDestination=/u01/app/oradata

#저장소 타입 설정(FS, ASM / Default : FS)
storageType=FS

#문자셋 설정(Default US7ASCII)
characterSet=AL32UTF8

#National CharacterSet 설정(Default AL16UTF8)
nationalCharacterSet=AL16UTF16

#데이터베이스를 등록할 리스너 이름
listeners=LISTENER

#데이터베이스 유형 선택(MULTIPURPOSE|DATA_WAREHOUSING|OLTP)
databaseType=MULTIPURPOSE

#샘플스키마 설치 여부 (Default False)
sampleSchema=TRUE

#데이타베이스에 사용될 메모리, MB 단위 ->  설정하고자 하는 메모리 크기를 입력합니다.
totalMemory=4096
[oracle@orcl dbca]$ dbca -silent -createDatabase

 

※ 실행파일 용도

path filename usage
$ORACLE_HOME/install/response db_install.rsp 소프트웨어 설치
$ORACLE_HOME/assistants/netca netca.rsp 리스너 생성
$ORACLE_HOME/assistants/dbca dbca.rsp 데이타베이스 생성

 

 

 


https://myinfrabox.tistory.com/208

 

[Oracle] Oracle 19c + CentOS7 사일런트(Silent) 설치

오라클을 설치할때는 2가지 방법이 있습니다. GUI에서 설치하는 방법과 백그라운드에서 설치되는 사일런트(Silent) 설치방법이 있습니다. 여기에서는 GUI로 설치하는 방법을 알아봅니다. ■ 오라클

myinfrabox.tistory.com

 

큰 도움을 받았습니다. 감사합니다.