IT/linux

RedHat에 Oracle 설치 시 환경 변수 설정

울티마 2015. 4. 2. 09:51

1. home/.bash_profile

 

# Oracle specific enviroment

export ORACLE_BASE=/oracle/app/oracle/product/920

export ORACLE_HOME=/oracle/app/oracle/product/920

export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/bin:.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib

export ORACLE_SID=rac2

export ORACLE_OWNER=oracle

#export ORACLE_TERM=xterm

export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601

#export NLS_LANG=AMERICAN_AMERICA.UTF8

export TNS_ADMIN=$ORACLE_HOME/network/admin

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export THREADS_FLAG=native

export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/jdbc/lib/classes12.jar:$ORACLE_HOME/jdbc/lib/nls_charset12.jar:.

# export DBCA_RAW_CONFIG=$ORACLE_HOME/DBCA_RAW_CONFIG

export PATH=$PATH:$ORACLE_HOME/jdk/bin

 

 

 

2. /etc/sysctl.conf

 

# memory for oracle

kernel.shmmax = 2147483648

kernel.sem = 100 32000 100 100

kernel.shmall = 2097152

kernel.shmmni = 4096

 

#network for oracle

net.core.rmem_default = 65535

net.core.rmem_max = 65535

net.core.wmem_default = 65535

net.core.wmem_max = 65535

net.ipv4.ip_local_port_range = 1024 65000

 

#filesystem for oracle

fs.file-max = 65536

 

#vm for oracle

vm.freepages = 1276 2552 3828

 

 

3. /etc/security/limits.conf

 

@oracle hard nofile 65535

@oracle hard nproc 16384

 

 

4. Oracle 9i RAC 설치시 cmcfg.ora

 

HeartBeat=15000

ClusterName=Oracle Cluster Manager, version 9i

PollInterval=1000

MissCount=20

PrivateNodeNames=prac1 prac2

PublicNodeNames=rac1 rac2

ServicePort=9998

CmDiskFile=/dev/raw/raw1

HostName=prac1

KernelModuleName=hangcheck-timer

 

 

5. rawdevice로 구성 시 rc.local 수정

 

touch /var/lock/subsys/local

/sbin/insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

/usr/bin/raw /dev/raw/raw1 /dev/sdb1

/usr/bin/raw /dev/raw/raw2 /dev/sdb2

/bin/chown -R oracle:dba /dev/raw/raw1

/bin/chown -R oracle:dba /dev/raw/raw2

/bin/chmod 600 /dev/raw/raw1

/bin/chmod 600 /dev/raw/raw2