신문지한장

[Install] oracle 19c install on Centos7.9 본문

Oracle/Install

[Install] oracle 19c install on Centos7.9

신문지한장 2023. 11. 25. 18:19
OS : CentOS7.9 (64bit)
DB : Oracle Database 19c ( Release - 19.3 )

1. OS 설정

1-1. 패키지 설치

# 
yum install -y bc binutils compat-libcap1 compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make smartmontools sysstat unzip

1-2. 커널 파라미터 설정

# 
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
# 
/sbin/sysctl -p

1-3. 유저 자원 사용값 설정

# 
vi /etc/security/limits.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-4. 기타 환경 설정

(1) 호스트 확인

# 
hostname

-- os hostname 확인
DBTEST
# 
vi /etc/hostname

-- os hostname 설정 확인(없다면 기입)
DBTEST
# 
vi /etc/hosts

-- IP, HOSTNAME 추가
192.168.0.134 DBTEST

 

(2) 유저 및 디렉토리 생성

# 
groupadd -g dba
useradd -g dba oracle
passwd oracle
mkdir -p /oracle/app/oracle/product/19.3.0
mkdir -p /oracle/app/oraInventory
chown -R oracle.dba /oracle

 

(3) SELINUX 설정

# vi /etc/selinux/config

--변경
SELINUX=permissive

 

(4) 방화벽 비활성화

# systemctl stop firewalld
# systemctl disable firewalld

 

(5) oracle 유저 환경 변수 설정

# su - oracle

$ vi ~/.bash_profile

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

# User specific environment and startup programs

export TMP=/tmp
export TMPDIR=/tmp

export ORACLE_SID=ORCL
export DB_UNIQUE_NAME=orcl
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=/oracle/app/oracle/product/19c
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$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_AMERICA.AL32UTF8

export PS1='[${ORACLE_SID}]'`hostname`':$PWD$ '
alias alert='cd $ORACLE_BASE/diag/rdbms/$DB_UNIQUE_NAME/$ORACLE_SID/trace'

$ source ~/.bash_profile

 

(6) 설치파일 압축 해제 및 설치 진행 (설치 파일 위치 : $ORACLE_HOME)

$
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
./runInstaller

 

 

(7) 리스너 설치

$
netca

 

(8) db 설치

$
dbca