Redhat AS 5.0下配置Oracle 10g RAC [ 日期:2007-09-03 ] [ 來(lái)自:本站原創(chuàng) ]
環(huán)境說(shuō)明: 操作系統(tǒng): Redhat AS 5.0 (kernel 2.6.18-8.e15xen) 數(shù)據(jù)庫(kù): Oracle 10g 10.2.0.1 配置步驟:
1.調(diào)整系統(tǒng)內(nèi)核參數(shù) vi /etc/sysctl.conf ===================================== kernel.shmall = 2097152 kernel.shmmax = 4294967296 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_max = 262144 ===================================== 然后執(zhí)行/sbin/sysctl -p 生效 2.設(shè)置oracle用戶的shell限制
vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 3.修改登錄配置文件
vi /etc/pam.d/login ===================================== session required /lib/security/pam_limits.so vi /etc/profile if [ \$USER = "oracle" ]; then if [ \$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi ===================================== 4.配置Hangcheck計(jì)時(shí)器
vi /etc/modprobe.conf ===================================== options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180 ===================================== vi /etc/rc.local ===================================== /sbin/modprobe hangcheck-timer ===================================== 5.創(chuàng)建用戶和安裝目錄(在集群主機(jī)上的用戶ID和組ID必須相同)
mkdir -p /u01/app/oracle/product/10.2.0/db_1 mkdir -p /u01/app/oracle/product/10.2.0/crs groupadd -g 115 dba groupadd -g 125 oinstall useradd -m -u 175 -g oinstall -G dba oracle passwd oracle chown -R oracle:oinstall /u01 chmod -R 775 /u01 6.設(shè)置Oracle用戶的環(huán)境變量
su - oracle vi .bash_profile ===================================== # User specific environment and startup programs umask 022 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_SID=qzpoais export NLS_LANG=AMERICAN_AMERICA.UTF8 export NLS_DATE_FORMAT="mm/dd/yyyy hh24:mi:ss" export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin export ORACLE_TERM=xterm export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS10=$ORACLE_HOME/nls/data export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS10=$ORACLE_HOME/nls/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_HOME/JRE export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export THREADS_FLAG=native export TEMP=/tmp export TMPDIR=/tmp ==================================== 然后執(zhí)行source .bash_profile 生效 7.編輯Hosts文件
vi /etc/hosts ==================================== 10.133.129.181 OraclusterA 10.133.129.182 OraclusterB 10.133.129.183 OraclusterA-vip 10.133.129.184 OraclusterB-vip 10.10.10.1 OraclusterA-priv 10.10.10.2 OraclusterB-priv ==================================== 備注:如果127.0.0.1記錄所對(duì)應(yīng)的名稱有出現(xiàn)主機(jī)名則要去掉,如OraclusterA.localhost.localdomain 改為localhost.localdomain,否則在安裝CRS的節(jié)點(diǎn)添加識(shí)別時(shí)會(huì)出錯(cuò) 8.安裝所需軟件包
使用rpm -qa XXX 查看是否已安裝 以下為所需軟件包: make 系統(tǒng)默認(rèn)安裝 binutils 系統(tǒng)默認(rèn)安裝 gcc 系統(tǒng)默認(rèn)安裝 compat-db cd3中 compat-gcc cd2中 compat-gcc-c++ cd2中 compat-libstdc++ 系統(tǒng)默認(rèn)安裝 compat-libstdc++-deve 系統(tǒng)默認(rèn)安裝 openmotif21 cd2中 setarch-1.3-1 系統(tǒng)默認(rèn)安裝 libxp 備注:RHEL5不同于RHEL4,默認(rèn)沒有安裝libxp軟件包,直接導(dǎo)致openmotif無(wú)法安裝(依賴關(guān)系),并在安裝時(shí)提示:/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory ,必須到光盤中找到對(duì)應(yīng)的軟件包并安裝,詳見:metalink Note:443617.1 |
|