oracle RAC 调整常用语句

本文详细介绍了 Oracle RAC 集群的配置步骤,包括 CRS 控制参数设置、监听器配置、ASM 磁盘创建及权限调整等关键操作,并提供了具体的命令示例。
;/llrac/app/oracle/product/10.2/crs/bin/crsctl set css diagwait 9
;/llrac/app/oracle/product/10.2/db_1/bin/crsctl set css trace 9
;/llrac/app/oracle/product/10.2/db_1/bin/crsctl set css misscount 120

;/llrac/app/oracle/product/10.2/db_1/bin/crsctl set css disktimeout 300
;/llrac/app/oracle/product/10.2/db_1/bin/crsctl set css reboottime 3
/llrac/app/oracle/product/10.2/db_1/bin/crsctl get css reboottime
 

ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.154)(PORT = 1521))' SID='racweb1'

ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.155)(PORT = 1521))' SID='racweb2'
 
 
 
/etc/init.d/oracleasm createdisk dsvol1 /dev/sdd5
/etc/init.d/oracleasm createdisk dsvol2 /dev/sdd6
/etc/init.d/oracleasm createdisk dsvol3 /dev/sdd7
/etc/init.d/oracleasm createdisk asvol1 /dev/sdd8
/etc/init.d/oracleasm createdisk asvol2 /dev/sdd9
/etc/init.d/oracleasm createdisk asvol3 /dev/sdd10
/etc/sysconfig/rawdevices
/dev/raw/raw11  /dev/sdd1
/dev/raw/raw12  /dev/sdd2
chown oracle:oinstall /dev/raw/raw11
chmod 664 /dev/raw/raw11
chown oracle:oinstall /dev/raw/raw12
chmod 664 /dev/raw/raw12
rpm -ivh oracleasm-support-2.1.3-1.el5.x86_64.rpm
rpm -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm
rpm -ivh oracleasmlib-2.0.4-1.el5.x86_64.rpm
 
racdb6.lilianwang.com
racdb6-heart.lilianwang.com
racdb6-vip.lilianwang.com

The installer has detected that your Cluster Ready Services (CRS) installation is distributed across the following nodes:
 racdb5
 racdb6
Because the software consists of local identical copies distributed across each of the nodes in the cluster, it is possible to patch your CRS installation in a rolling manner, one node at a time.
To complete the installation of this patchset, you must perform the following tasks on each node:
 1. Log in as the root user.
 2. As the root user, perform the following tasks:
  a. Shutdown the CRS daemons by issuing the following command:
    /lloracle/app/oracle/product/10.2/crs/bin/crsctl stop crs
  b. Run the shell script located at:
    /lloracle/app/oracle/product/10.2/crs/install/root102.sh
   This script will automatically start the CRS daemons on the
   patched node upon completion.
 3. After completing this procedure, proceed to the next node and repeat.

The following J2EE Applications have been deployed and are accessible at the URLs listed below.
 
192.168.1.55      racdb6.lilianwang.com racdb6 
192.168.1.155      racdb6-vip.lilianwang.com racdb6-vip 
172.16.1.55     racdb6-heart.lilianwang.com racdb6-heart

192.168.1.54      racdb5.lilianwang.com racdb5
192.168.1.154      racdb5-vip.lilianwang.com racdb5-vip
172.16.1.54     racdb5-heart.lilianwang.com racdb5-heart
echo "/sbin/modprobe hangcheck-timer" >> /etc/rc.local
echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modprobe.conf
 
cat >> /etc/security/limits.conf <<EOF
oracle soft   nofile 65536
oracle hard   nofile 65536
oracle soft   nproc 16384
oracle hard   nproc 16384
EOF
 
cat >> /etc/pam.d/login <<EOF
session    required     /lib/security/pam_limits.so
EOF
 
kernel.shmall = 2097152
kernel.shmmax = 8589934592
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
 
chown oracle:oinstall /dev/raw/raw11
chmod 664 /dev/raw/raw11
chown oracle:oinstall /dev/raw/raw12
chmod 664 /dev/raw/raw12

groupadd -g 1001 oinstall
groupadd -g 1002 dba
useradd -u 500  -g oinstall -G dba oracle
passwd oracle
mkdir -p /llrac/app/oracle/product/10.2/db_1
mkdir -p /llrac/app/oracle/product/10.2/crs
chown  -R oracle.oinstall  /llrac/app/

export ORACLE_BASE=/llrac/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2/crs
export ORACLE_CONFIG_HOME=/llrac/app/oracle/product/10.2/crs
export ORACLE_SID=racdbll5
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib
export PATH=.:$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$ORACLE_HOME/OPatch
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/rdbms/jlib/$CLASSPATH
NLS_LANG=AMERICAN_AMERICA.zhs16gbk;export NLS_LANG
 
 
raw11        4G
raw12        4G
datastore1     80G
      80G
      80g
archstore1     60G
      60G
      60G









本文转自 jxwpx 51CTO博客,原文链接:http://blog.51cto.com/jxwpx/274078,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值