본문 바로가기
Oracle/설치

Oracle 19c Silent Single Install (CentOS 7.8 64bit)

by 취미툰 2020. 11. 17.
반응형

DB를 설치해 줄 일이 있어 설치를 하였는데,

GUI설치가 되지 않는 환경이라, Silent모드로 설치를 진행하였습니다.

 

설치 순서를 정리한것을 포스팅하겠습니다.

 

OS 정보

# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)

 

 

root유저로 수행

1. /etc/hosts에 IP와 hostname 추가

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.20.24.10 wms.localdomain     wms

 

2. /etc/sysctl.conf 에 OS 커널파라미터 수정

#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

 

3. /etc/security/limits.d/oracle-database-preinstall-19c.conf 에 OS유저 리소스 제한 정보 추가

# 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

 

4.RPM 확인 및 없는 RPM 설치(아래의 RPM 목록은 Oracle-base기준으로 조사한 RPM입니다. #처리된 RPM은 없어도 설치가 되었습니다

rpm -q bc    
rpm -q binutils
rpm -q compat-libcap1
rpm -q compat-libstdc++-33
#rpm -q dtrace-utils
rpm -q elfutils-libelf
rpm -q elfutils-libelf-devel
rpm -q fontconfig-devel
rpm -q glibc
rpm -q glibc-devel
rpm -q ksh
rpm -q libaio
rpm -q libaio-devel
#rpm -q libdtrace-ctf-devel
rpm -q libXrender
rpm -q libXrender-devel
rpm -q libX11
rpm -q libXau
rpm -q libXi
rpm -q libXtst
rpm -q libgcc
rpm -q librdmacm-devel
rpm -q libstdc++
rpm -q libstdc++-devel
rpm -q libxcb
rpm -q make
rpm -q smartmontools
rpm -q sysstat

 

5.RPM 설치

1.(yum가능 환경일시)yum -y install RPM명 으로 하거나,

2.(yum 사용 불가일시)설치 CD mount 후 Packages에 접속하여 manual하게 RPM을 설치합니다.

 

 

6.OS User 생성 및 Group 생성

groupadd -g 54321 oinstall
groupadd -g 54322 dba

useradd -u 54321 -g oinstall -G dba,oper oracle

passwd oracle
[비밀번호입력]

 

7.디렉토리 생성 및 권한 부여

--오라클 엔진이 설치될 디렉토리
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1

--오라클 데이터파일들이 설치될 디렉토리
mkdir /data/oradata

--권한부여 및 소유자 변경
chown -R oracle:oinstall /u01 /data
chmod -R 775 /u01 /data

 

Oracle유저로 수행

8.Oracle 프로파일 수정

 

vi .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 EDITOR=vi
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORACLE_SID=wms
export ORACLE_TERM=xterm
export DATA_DIR=/data/oradata
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin::$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_KOREA.AL32UTF8
export PS1='[\u@$ORACLE_SID \W]$ '
export ORA_INVENTORY=/u01/app/oraInventory

 

9.압축파일 풀기

설치파일은 아래의 URL에서 다운받을 수 있습니다.

 

www.oracle.com/database/technologies/oracle19c-linux-downloads.html

unzip LINUX.X64_193000_db_home.zip-d $ORACLE_HOME

 

 

10.엔진설치를 위한 rsp파일 수정

 

$ORACLE_HOME/install/response/db_insall.rsp 파일을 사용

만약을 위해 원본은 놔두고 새로 하나 생성하여 변경

 

수정해야할 목록들을 많지만 그 중에서 필요한 목록들만 수정합니다.

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

ORACLE_BASE==/u01/app/oracle

oracle.install.db.InstallEdition=SE2

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=oper

oracle.install.db.OSBACKUPDBA_GROUP=dba

oracle.install.db.OSDGDBA_GROUP=dba

oracle.install.db.OSKMDBA_GROUP=dba

oracle.install.db.OSRACDBA_GROUP=dba

 

아래는 제가 설정한 db_install.rsp입니다. 개인적으로 변경하실부분 변경하셔서 사용하셔도 됩니다.

db_install.rsp
0.02MB

 

11.실행전 검증

이 부분에서 에러 발생시 그부분을 해결하고 설치로 넘어가면 됩니다.

 

$ $ORACLE_HOME/runInstaller -silent -responseFile ~/db_install.rsp -executePrereqs
Launching Oracle Database Setup Wizard...

Prerequisite checks executed successfully.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2020-11-16_04-04-59PM

 

12.엔진 설치

설치 중 root유저로 스크립트를 돌리라는 창이뜨면 반드시!! 두개의 스크립트를 수행하여야 합니다.

 

 

$ $ORACLE_HOME/runInstaller -silent -responseFile ~/db_install.rsp -waitForCompletion
Launching Oracle Database Setup Wizard...

[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.
   ACTION: It is recommended to provide an empty location for the inventory.
The response file for this session can be found at:
 /u01/app/oracle/product/19.0.0/dbhome_1/install/response/db_2020-11-16_04-18-28PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2020-11-16_04-18-28PM/installActions2020-11-16_04-18-28PM.log

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[dev-db-wms]
Execute /u01/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes:
[dev-db-wms]


Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2020-11-16_04-18-28PM

아래는 스크립트 수행 내용입니다.

--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 oinstall.
The execution of the script is complete.


# /u01/app/oracle/product/19.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/19.0.0/dbhome_1/install/root_dev-db-wms_2020-11-16_16-20-09-383126045.log for the output of root script

Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/dbhome_1
   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.
Oracle Trace File Analyzer (TFA) is available at : /u01/app/oracle/product/19.0.0/dbhome_1/bin/tfactl

엔진 설치 완료

 

13.리스너 설정

저의 경우에는 기본설정으로 등록하였으므로 rsp파일을 따로 수정하지 않고 수행하였습니다.

 

$ORACLE_HOME/assistants/netca 디렉토리 밑에 netca.rsp파일을 수정하여 설정을 변경할 수 있습니다.

--파일 복사
cp $ORACLE_HOME/assistants/netca/netca.rsp ~/netca.rsp


--설치
$ netca /silent /responseFile ~/netca.rsp

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

--설치 확인
$ lsnrctl stat LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-NOV-2020 16:26:45

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev-db-wms.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                16-NOV-2020 16:26:29
Uptime                    0 days 0 hr. 0 min. 16 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dev-db-wms/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dev-db-wms.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

 

14. DB 구성

$ORACLE_HOME/assistants/dbca 밑에있는 dbca.rsp파일로도 설치가 가능합니다.

저의 경우에는 명령어로 manual하게 설정값을 다 부여하고 DB를 설치하였습니다.

 

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 "/data/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:
 /u01/app/oracle/cfgtoollogs/dbca/wms.
Database Information:
Global Database Name:wms
System Identifier(SID):wms
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/wms/wms.log" for further details.



--설치 확인
$ ps -ef |grep pmon
oracle    83835      1  0 16:51 ?        00:00:00 ora_pmon_wms
...생략
sqlplus / as sysdba
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
wms              OPEN

 

DB 설치 완료

 

반응형

댓글