Oracle11GR2RAC安装手册 联系客服

发布时间 : 星期一 文章Oracle11GR2RAC安装手册更新完毕开始阅读5e92f622a100a6c30c22590102020740bf1ecd68

(8) rac1节点重启NTPD服务

#service ntpd restart (9) rac2节点停止NTPD服务,rac1重启NTPD服务后5、6分钟再执行

#service ntpd stop #ntpdate rac1 #service ntpd start (10) NTPD启用自动加载(rac1,rac2)

#chkconfig ntpd on 6. 关闭服务

关闭rac1和rac2无用的sendmail和cups服务,加快开机速度。 #chkconfig sendmail off #chkconfig cups off 7. 用户、用户组 (1) 创建用户和用户组

#groupadd -g 501 oinstall #groupadd -g 502 dba #groupadd -g 504 asmadmin #groupadd -g 506 asmdba #groupadd -g 507 asmoper #useradd -u 501 -g oinstall -G dba,asmadmin,asmdba,asmoper grid #useradd -u 502 -g oinstall -G dba,asmdba oracle #id oracle #id grid (2) 修改用户密码

#passwd oracle #passwd grid 8. 文件夹及权限

#mkdir -p /u01/app/grid/ #mkdir -p /u01/app/11.2.0/grid/product/db_1 #mkdir -p /u01/app/oraInventory #chown -R grid:oinstall /u01/app #mkdir -p /u01/app/oracle/product/11.2.0/db_1 #chown -R oracle:oinstall /u01/app/oracle #chmod -R 775 /u01 9. 修改系统参数

(1) 修改rac1和rac2的limits.conf

#vi /etc/security/limits.conf ###ORACLE SETTING grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 (2) 修改rac1和rac2的/etc/pam.d/login

#vi /etc/pam.d/login ###ORACLE SETTING session required pam_limits.so (3) 修改rac1和rac2的/etc/sysctl.conf #vi /etc/sysctl.conf ###ORACLE SETTING fs.aio-max-nr = 1048576 fs. = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 (4) 执行命令(rac1、rac2) #sysctl -p (5) 修改rac1和rac2的profile,在末尾添加 #vi /etc/profile if [ $USER = \ if [ $SHELL = \ ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi umask 022 (6) 执行命令(rac1、rac2) #source /etc/profile (7) 修改rac1和rac2的/etc/csh.login #vi /etc/csh.login if ( $USER = \ limit maxproc 16384 limit descriptors 65536 endif EOFCSH (8) 修改grid用户的环境变量

#su - grid

$cd /home/grid/ $vi .bash_profile

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM1; export ORACLE_SID

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1; export ORACLE_HOME NLS_DATE_FORMAT=\THREADS_FLAG=native; export THREADS_FLAG PATH=$ORACLE_HOME/bin:$PATH; export PATH THREADS_FLAG=native; export THREADS_FLAG PATH=$ORACLE_HOME/bin:$PATH; export PATH if [ $USER = \ if [ $SHELL = \ ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi

umask 022 fi

#su - grid

$cd /home/grid/ $vi .bash_profile

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM2; export ORACLE_SID

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1; export ORACLE_HOME NLS_DATE_FORMAT=\THREADS_FLAG=native; export THREADS_FLAG PATH=$ORACLE_HOME/bin:$PATH; export PATH THREADS_FLAG=native; export THREADS_FLAG PATH=$ORACLE_HOME/bin:$PATH; export PATH if [ $USER = \ if [ $SHELL = \ ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi (9) 执行命令(rac1、rac2)

$source .bash_profile (10) 修改oracle用户的环境变量

#su - oracle

$cd /home/oracle/ $vi .bash_profile

# Oracle Settings oracle TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=orcl1; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH

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

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

NLS_DATE_FORMAT=\NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG if [ $USER = \ if [ $SHELL = \ ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536