본문 바로가기
Oracle

Linux 설치 후 Oracle RAC 환경 구성 절차

by 도경다경 2023. 4. 7.
반응형

Redhat 기준 OS 설치 후 Oracle RAC 환경구성을 위해 다음 절차를 수행한다.

 

1. oracle 환경변수 설정

2. oracle 관련 package 설치

3. oracle 관련 계정 생성

4. oracle filesystem 구성 및 권한 변경

 

세부 내역은 다음과 같다.

 

1. oracle 환경변수 설정(기본값이므로 DBA가 별도 튜닝)

echo "" >> /etc/sysctl.conf
echo "#### oracle env ####" >> /etc/sysctl.conf
echo "kernel.sem = 250    32000    100    128" >> /etc/sysctl.conf
echo "kernel.shmall = 1073741824" >> /etc/sysctl.conf
echo "kernel.shmmax = 4398046511104" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.panic_on_oops = 1" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500" >> /etc/sysctl.conf

2. oracle 관련 package 설치

mount -o loop /sysadmin/rhel-8.4~.iso /media
sleep 1
yum install -y libaio-devel
yum install -y librdmacm
yum install -y kmod-redhat-oracleasm
yum install -y libnsl

## 다음 package는 oracle 제공
yum localinstall -y /sysadmin/oracleasm/oracleasmlib-~.x86_64.rpm
yum localinstall -y /sysadmin/oracleasm/oracleasm-support-~.x86_64.rpm
sleep 1
umount /media

3. oracle 관련 계정 생성

groupadd -g 510 oinstall
groupadd -g 520 asmadmin
groupadd -g 530 asmdba
groupadd -g 540 asmoper
groupadd -g 500 dba

useradd -u 501 -g 510 -c "oracle" oracle
useradd -u 502 -g 510 -c "grid" grid

usermod -G oinstall,dba,asmadmin,asmdba oracle
usermod -G oinstall,dba,asmadmin,asmdba,asmoper oracle

chage -M -1 oracle
chage -M -1 grid

4. oracle filesystem 구성 및 권한 변경

mkdir /oracle
mkdir /grid
mkdir /oracle_diag
mkdir /package

lvcreate -n oracle -L 100G vg1
lvcreate -n grid -L 100G vg1
lvcreate -n oracle_diag -L 100G vg1
lvcreate -n package -L 100G vg1

sleep 2

mkfs.xfs /dev/vg1/oracle
mkfs.xfs /dev/vg1/grid
mkfs.xfs /dev/vg1/oracle_diag
mkfs.xfs /dev/vg1/package

sleep 2

echo "/dev/vg1/oracle    /oracle    xfs    defaults    0 0"    >>    /etc/fstab
echo "/dev/vg1/grid        /grid       xfs    defaults    0 0"    >>    /etc/fstab
echo "/dev/vg1/oracle_diag    /oracle_diag    xfs    defaults    0 0"    >>    /etc/fstab
echo "/dev/vg1/package    /package    xfs    defaults    0 0"    >>    /etc/fstab

sleep 2

mount -a

chown oracle:oinstall /oracle
chown grid:oinstall /grid
chown oracle:oinstall /oracle_diag
chown oracle:oinstall /package

df -h

반응형

댓글