ORACLE 11G RAC安装配置.doc_第1页
ORACLE 11G RAC安装配置.doc_第2页
ORACLE 11G RAC安装配置.doc_第3页
ORACLE 11G RAC安装配置.doc_第4页
ORACLE 11G RAC安装配置.doc_第5页
已阅读5页,还剩40页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ORACLE 11G RAC安装配置(自整理)测试配置缓环境:Red Hat Enterprise Linux 5.8一、关闭防火墙rootrac01 # service iptables stoprootrac01 # chkconfig iptables offrootrac01 # chkconfig iptables listiptables 0:off 1:off 2:off 3:off 4:off 5:off 6:offrootrac01 # vi /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:# targeted - Targeted processes are protected,# mls - Multi Level Security protection.SELINUXTYPE=targeted二、修改hosts文件(所有节点)rootrac01 # vi /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail. localhost.localdomain localhost:1 localhost6.localdomain6 localhost611 rac0112 rac011 rac01-priv12 rac02-priv13 rac01-vip14 rac02-vip15 rac-scan16 rac-scan17 rac-scan三、添加组和用户创建组:rootrac01 # groupadd -g 1000 oinstallrootrac01 # groupadd -g 1001 asmadminrootrac01 # groupadd -g 1002 dbarootrac01 # groupadd -g 1003 asmdbarootrac01 # groupadd -g 1004 asmoper创建grid用户:rootrac01 # useradd -u 1000 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -m grid为grid用户设密码:rootrac01 #passwd grid创建oracle用户:如果oracle用户不存在,则:rootrac01 # useradd -u 1001 -g oinstall -G dba,asmdba -d /home/oracle -m oracle如果oracle用户已经存在,则:rootrac01 # usermod -g oinstall -G dba,asmdba u 1001 oracle为oracle用户设密码:rootrac01 # passwd oracle检测nobody用户rootrac01 # id nobody如果不存在,则:rootrac01 # useradd nobody四、配SSH互信为ssh和scp创建连接ls -l /usr/local/bin/sshls -l /usr/local/bin/scp不存在则创建rootrac01 # /bin/ln -s /usr/bin/ssh /usr/local/bin/sshrootrac01 # /bin/ln -s /usr/bin/scp /usr/local/bin/scp为grid用户配置SSH:在每个节点上:rootrac01 # su gridgridrac01 # mkdir /.sshgridrac01 #cd .sshgridrac01 # ssh-keygen -t rsagridrac01 # ssh-keygen -t dsa在节点1上:gridrac01 # touch authorized_keysgridrac01 # ssh rac01 cat /home/grid/.ssh/id_rsa.pub authorized_keysgridrac01 # ssh rac02 cat /home/grid/.ssh/id_rsa.pub authorized_keysgridrac01 # ssh rac01 cat /home/grid/.ssh/id_dsa.pub authorized_keysgridrac01 # ssh rac02 cat /home/grid/.ssh/id_dsa.pub authorized_keysgridrac01 # scp authorized_keys rac02:/home/grid/.ssh/ 分别在每个节点上:gridrac01 # ssh rac01 dategridrac01 # ssh rac02 dategridrac01 # ssh-agent $SHELLgridrac01 # ssh-add为oracle用户配置SSH:在每个节点上:rootrac01 # su oracleoraclerac01 # mkdir /.sshoraclerac01 #cd .sshoraclerac01 # ssh-keygen -t rsaoraclerac01 # ssh-keygen -t dsa在节点1上:oraclerac01 # touch authorized_keysoraclerac01 # ssh rac01 cat /home/oracle/.ssh/id_rsa.pub authorized_keysoraclerac01 # ssh rac02 cat /home/oracle/.ssh/id_rsa.pub authorized_keysoraclerac01 # ssh rac01 cat /home/oracle/.ssh/id_dsa.pub authorized_keysoraclerac01 # ssh rac02 cat /home/oracle/.ssh/id_dsa.pub authorized_keysoraclerac01 # scp authorized_keys rac02:/home/oracle/.ssh/ 分别在每个节点上:oraclerac01 # ssh rac01 dateoraclerac01 # ssh rac02 dateoraclerac01 # ssh-agent $SHELLoraclerac01 # ssh-add五、配置NTProotrac01 #vi /etc/ntp.conf.#server 0.#server 1.#server 2.server 15#server # local clock#fudge stratum 10rootrac01 # vi /etc/sysconfig/ntpd# Drop root to id ntp:ntp by default.OPTIONS=-x -u ntp:ntp -p /var/run/ntpd.pid# Set to yes to sync hw clock after successful ntpdateSYNC_HWCLOCK=yes# Additional options for ntpdateNTPDATE_OPTIONS= 启动rootrac01 # chkconfig ntpd onrootrac01 # service ntpd startrootrac01 # ntpdate -d -u 15启用name service cache daemonrootrac01 # chkconfig -level 35 nscd onrootrac01 # service nscd restart六、配置内核参数:rootrac01 # vi /etc/sysctl.conf# for oracle 11gfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2147483648kernel.shmmax = 68719476736kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586使修改参数立即生效:rootrac01 # /sbin/sysctl -prootrac01 # /etc/security/limits.confgrid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536rootrac01 # /etc/pam.d/loginsession required pam_limits.sorootrac01 # /etc/profileif $USER = oracle | $USER = grid ; then if $SHELL = /bin/ksh ; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022fi七、对硬盘进行分区:以下操作在节点1完成:rootrac01 # fdisk /dev/sdbCommand (m for help): pDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id SystemCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-1044, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): Using default value 1044Command (m for help): pDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 1 1044 8385898+ 83 LinuxCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.fdisk /dev/sdcfdisk /dev/sdd八、安装asmlib并进行配置rootrac01 #uname r在每个节点上都进行安装rootrac01 # rpm -ihv oracleasm-support-2.1.3-1.el5.x86_64.rpmrootrac01 # rpm -ihv oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpmrootrac01 # rpm -ihv oracleasmlib-2.0.4-1.el5.x86_64.rpm配置asmlib以下操作在每个节点上进行:rootrac01 # oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets (). Hitting without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface : gridDefault group to own the driver interface : asmadminStart Oracle ASM library driver on boot (y/n) n: yScan for Oracle ASM disks on boot (y/n) y: Writing Oracle ASM library driver configuration: donerootrac01 # oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasmLoading module oracleasm: oracleasmMounting ASMlib driver filesystem: /dev/oracleasm初始化 ASM磁盘以下操作在节点1完成:rootasm01 # oracleasm createdisk disk01 /dev/sdb1Writing disk header: doneInstantiating disk: donerootasm01 # oracleasm createdisk disk02 /dev/sdc1Writing disk header: doneInstantiating disk: doneoracleasm createdisk disk03 /dev/sdd1oracleasm createdisk disk04 /dev/sde1oracleasm createdisk disk05 /dev/sdf1oracleasm createdisk disk06 /dev/sdg1检查ASM硬盘配置节点1:rootrac01 asmlib# oracleasm listdisksDISK01DISK02DISK03其他节点:rootrac02 asmlib# oracleasm listdisks-注意:此处命令输出为空是正常rootrac02 asmlib# oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks.Scanning system for ASM disks.Instantiating disk DISK01Instantiating disk DISK02Instantiating disk DISK03rootrac02 asmlib# oracleasm listdisksDISK01DISK02DISK03九、Grid安装过程grid用户:gridrac01 # vi .bash_profileexport ORACLE_SID=+ASM1/+ASM2export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=/u01/app/grid/11.2export PATH=$PATH:$ORACLE_HOME/binoracle用户:oraclerac01 # vi .bash_profileexport ORACLE_SID=racdb1/racdb2export ORACLE_UNQNAME=$ORACLE_SIDexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/11.2/db_1export PATH=$PATH:$ORACLE_HOME/bin建立相关目录:rootrac01 # mkdir -p /u01/app/oraclerootrac01 # mkdir -p /u01/app/oracle/u01/app/grid/11.2rootrac01 # chown -R grid:oinstall /u01/app/oraclerootrac01 # chown -R grid:oinstall /u01/app/oracle/u01/app/grid/11.2rootrac01 # chmod 775 -R /u01/app/oraclerootrac01 # chmod 775 -R /u01/app/oracle/u01/app/grid/11.2rootrac01 #mkdir -p /u01/app/oraclerootrac01 #mkdir -p /u01/app/oracle/11.2/db_1rootrac01 #chown -R oracle:oinstall /u01/app/oracle/11.2/db_1rootrac01 #chmod 775 -R /u01/app/oracle/11.2/db_1安装Grid Infrastructure软件以下图形界面:节点1的root.sh输出LOG节点2的root.sh输出LOG确认Grid安装成功CRS状态gridrac01 $ crs_stat -tName Type Target State Host-ora.CRSDG.dg ora.up.type ONLINE ONLINE rac01ora.ER.lsnr ora.er.type ONLINE ONLINE rac01ora.N1.lsnr ora.er.type ONLINE ONLINE rac01ora.asm ora.asm.type ONLINE ONLINE rac01ora.eons ora.eons.type ONLINE ONLINE rac01ora.gsd ora.gsd.type OFFLINE OFFLINEwork ora.rk.type ONLINE ONLINE rac01ora.oc4j ora.oc4j.type OFFLINE OFFLINEora.ons ora.ons.type ONLINE ONLINE rac01ora.SM1.asm application ONLINE ONLINE rac01ora.01.lsnr application ONLINE ONLINE rac01ora.rac01.gsd application OFFLINE OFFLINEora.rac01.ons application ONLINE ONLINE rac01ora.rac01.vip ora.t1.type ONLINE ONLINE rac01ora.SM2.asm application ONLINE ONLINE rac02ora.02.lsnr application ONLINE ONLINE rac02ora.rac02.gsd application OFFLINE OFFLINEora.rac02.ons application ONLINE ONLINE rac02ora.rac02.vip ora.t1.type ONLINE ONLINE rac02ora.scan1.vip ora.ip.type ONLINE ONLINE rac01标为蓝色的四个服务,在11g里面是可选项,并且默认是offline,可忽略。voting disk状态gridrac01 $ crsctl query css votedisk# STATE File Universal Id File Name Disk group- - - - - 1. ONLINE 7b8903f49cc84fa8bf06d199bdf5dfe3 (ORCL:DISK01) CRSDGOCR状态gridrac01 $ ocrcheckStatus of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120Used space (kbytes) : 2264 Available space (kbytes) : 259856 ID : 1510360228 Device/File Name : +CRSDG Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged userASM磁盘组配置检查监听状态gridrac01 $ lsnrctl statusLSNRCTL for Linux: Version .0 - Production on 16-MAR-2011 16:24:36Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)STATUS of the LISTENER-Alias LISTENERVersion TNSLSNR for Linux

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论