hostname 변경
hostnamectl set-hostname rac2
유저 생성
groupadd oinstall
groupadd dba
usermod -g oinstall -G dba oracle
usermod -g dba grid
passwd oracle # 비밀번호 설정 (옵션)
cat /etc/group
cat /etc/passwd
경로 및 alias 설정
# .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_HOSTNAME=test1
export ORACLE_BASE=/u01/app/oracle
export DB_HOME=$ORACLE_BASE/product/19.0.0/db_1
export ORACLE_HOME=$DB_HOME
export GRID_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=
export ORACLE_TERM=xterm
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/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_DATE_FORMAT='YYYY-MM-DD:HH24:MI:SS'
export DISPLAY=localhost:10.0
alias ss='sqlplus "/as sysdba"'
보안 설정 수정
vi /etc/selinux/config
SELINUX=disabled # SELINUX=enforcing
불필요한 서비스 중지
### 방화벽 중지
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
### 블루투스 중지
systemctl stop bluetooth
systemctl disable bluetooth
임시 파일 시스템 할당
vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=16g 0 0
mount -o remount /dev/shm
systemctl daemon-reload #linux8
df -h | grep shm
hosts 설정
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
### Public
10.0.2.15 test1
10.0.2.16 test2
### Private
192.168.1.15 test1-priv
192.168.1.16 test2-priv
### Virtual
10.0.2.17 test1-vip
10.0.2.18 test2-vip
### SCAN
10.0.2.19 test-scan
환경변수 설정
vi /etc/sysctl.conf
#19c
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824 #페이지 보통 4KB = 메모리의 절반/4096
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/pam.d/login
session required pam_limits.so
vi /etc/security/limits.conf
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid soft memlock 15099494
grid hard memlock 15099494 --메모리의 90%
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 15099494
oracle hard memlock 15099494
폴더 생성
mkdir -p $DB_HOME
mkdir -p $GRID_HOME
#mkdir -p /home/grid
chown -R oracle:dba /u01
chown -R oracle:dba /home
chmod -R 775 /u01
yum repository 설정
cd /etc/yum.repos.d/
[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 # 연결하려는 항목을 1로 변경
[root@rac1 yum.repos.d]]# yum clean all
[root@rac1 yum.repos.d]]# yum repolist
삭제
rm -rf $GRID_HOME
rm -rf $DB_HOME
rm -rf $ORACLE_BASE
rm -rf /etc/orInst.loc
rm -rf /etc/oratab
rm -rf /etc/oracle
rm -rf /var/tmp/.oracle
rm -rf /tmp/logs
rm -rf /u01/app/oraInventory'RAC' 카테고리의 다른 글
| 19c 필수 패키지 (0) | 2026.04.06 |
|---|---|
| yum repository 구성 (0) | 2024.10.21 |
| virtual box 포트포워딩 설정 (0) | 2024.10.21 |
| Windows 환경에서 Oracle SID 설정 하기 (0) | 2024.10.14 |
| [SSH 오류 해결] VMware 환경에서 포트 설정 및 프라이빗 키 권한 문제 해결하기 (0) | 2023.11.30 |