Oracle 11gR2 rac for linux简明安装手册 |
04-11 by J |
Oracle 11gR2相对之前的版本(包括11gR1),clusterware有一个重要的变革,即11gR2将clusterware按照"网格"的理念放大到一个新的产品,称为Grid Infrastructure。Grid Infrastructure除了具有之前版本中clusterware的功能外,还对clusterware进行了扩展。 Grid Infrastructure OUI安装时不再支持将集文件安装到块设备和raw映射设备。 Oracle 11gR2 rac相对之前版本对服务器硬件要求更高,这对真实的生产环境当然没有影响。但是对我们使用虚拟机安装的实验环境会造成空前的压力.. 在官方安装文档中,对运行Grid Infrastructure的服务器要求至少1.5G内存,如果部署Grid Infrastructure后还要在这台服务器部署Oracle RAC,则需要至少2.5G内存。 以下实验环境为: 宿主主机: Intel E8500/win7 x64/4x2G/500G 虚拟机环境: VMware-server-2.0.2-203138 for win x64,两个虚拟机各3g内存,实际上如果内存紧张的话,两个虚拟机内存可以不一样多,第二个节点可以稍微少分一些。操作系统使用Enterprise-R5-U4-Server-i386,使用PAE内核 数据库软件: Grid Infrastructure for linux(11.2.0.1.0) Oracle Database 11g for linux(11.2.0.1.0) Oracle De-install Utility for linux(11.2.0.1.0) 工具软件: VMware-vix-1.6.2-203138 vmware-vmrc-win32-x86 Xmanager-v3.0Build0128 Secure CRT PLSQL Developer 参考官方文档: e10812,e10840,e10500,e10717,e10718 部署 一,准备工作 1,创建vmware共享磁盘 vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\crs.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data1.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data2.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data3.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data4.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data5.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data6.vmdk" vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:\vmware\disk\data7.vmdk" 2,创建2个虚拟机,并修改配置文件 scsi1.present = "TRUE" scsi1.virtualDev = "lsilogic" scsi1.sharedBus = "virtual" scsi1:0.present = "TRUE" de = "independent-persistent" scsi1:0.fileName = "d:\vmware\disk\crs.vmdk" scsi1:0.deviceType = "disk" scsi1:2.present = "TRUE" de = "independent-persistent" scsi1:2.fileName = "d:\vmware\disk\share1.vmdk" scsi1:2.deviceType = "disk" scsi1:3.present = "TRUE" de = "independent-persistent" scsi1:3.fileName = "D:\vmware\disk\share4.vmdk" scsi1:3.deviceType = "disk" scsi1:4.present = "TRUE" de = "independent-persistent" scsi1:4.fileName = "D:\vmware\disk\share5.vmdk" scsi1:4.deviceType = "disk" scsi1:5.present = "TRUE" de = "independent-persistent" scsi1:5.fileName = "D:\vmware\disk\share6.vmdk" scsi1:5.deviceType = "disk" scsi1:6.present = "TRUE" de = "independent-persistent" scsi1:6.fileName = "D:\vmware\disk\share7.vmdk" scsi1:6.deviceType = "disk" scsi1:8.present = "TRUE" de = "independent-persistent" scsi1:8.fileName = "D:\vmware\disk\share8.vmdk" scsi1:8.deviceType = "disk" scsi1:9.present = "TRUE" de = "independent-persistent" scsi1:9.fileName = "D:\vmware\disk\share9.vmdk" scsi1:9.deviceType = "disk" 安装plsqlscsi1:10.present = "TRUE" de = "independent-persistent" scsi1:10.fileName = "D:\vmware\disk\share10.vmdk" scsi1:10.deviceType = "disk" disk.locking = "FALSE" diskLib.dataCacheMaxSize = "0" diskLib.dataCacheMaxReadAheadSize = "0" diskLib.dataCacheMinReadAheadSize = "0" diskLib.dataCachePageSize = "4096" diskLib.maxUnsyncedWrites = "0" 3,安装虚拟机操作系统并配置环境 [root@n01 ~]# chkconfig --list|grep on anacron 0:off 1:off 2:off 3:off 4:off 5:off 6:off apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off conman 0:off 1:off 2:off 3:off 4:off 5:off 6:off cpuspeed 0:off 1:on 2:off 3:off 4:off 5:off 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:off 3:off 4:off 5:off 6:off netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off nscd 0:off 1:off 2:on 3:on 4:on 5:on 6:off oracleasm 0:off 1:off 2:on 3:on 4:on 5:on 6:off rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off restorecond 0:off 1:off 2:off 3:off 4:off 5:off 6:off smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off sysstat 0:off 1:off 2:on 3:on 4:off 5:on 6:off wdaemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off 二,Grid Infrastructure 1,新特性 (1) Automatic Storage Management and Oracle Clusterware Installation 11gR2中,asm和clusterware软件是安装到一个home目录 (2) Automatic Storage Management and Oracle Clusterware Files 11gR2中,ocr和vote文件除了部署到共享文件系统或者nfs之外,还可以部署到asm的磁盘组中。原则上不支持再部署到块设备或者raw设备,但是如果是升级到11gR2还是可以用的。 (3) Automatic Storage Management Cluster File System (ACFS) 11gR2中,asm可以提供集文件系统给服务器其他应用使用,acfs一样拥有asm在存储上的优点 (4) ASM Job Role Separation Option with SYSASM 11gR2中,asm管理被从sysdba角中分离到sysasm (5) Cluster Time Synchronization Service 11gR2中,新增的ctss可以保证在集中没有配置ntp的情况下,实现时间同步。 (6) Enterprise Manager Database Control Provisioning 新的em在rac配置完成后可以用来对rac进行管理,增加或者改变节点。 (7) Fixup Scripts and Grid Infrastructure Checks Grid Infrastructure安装过程中提供更多的环境配置帮助。 (8) SCAN for Simplified Client Access single client access name (SCAN),不同于之前版本的节点vip概念,scan ip绑定为集中的某项服务,而不是具体服务器。scan可以指定1-3个ip。 scan可以配置为与dns或者gns协同合作。scan使集中的节点变化更加透明。 (9) SRVCTL Command Enhancements for Patching 增强的srvctl (10) Typical Installation Option 安装过程中的典型安装选项。 (11) Voting Disk Backup Procedure Change 之前版本中需要使用dd来备份vote盘,新版本中在磁盘配置发生变化后系统会自动进行备份,不在需要人工备份。 2,配置环境 [root@n01 ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost 192.168.175.100 n01.localdomain n01 192.168.175.101 vip-n01.localdomain vip-n01 192.168.1.100 int-n01.localdomain int-n01 192.168.175.187 n-cluster-scan 192.168.175.200 n02.localdomain n02 192.168.175.201 vip-n02.localdomain vip-n02 192.168.1.200 int-n02.localdomain int-n02 [root@n01 ~]# cat /f fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 _default = 262144 _max = 4194304 wmem_default = 262144 wmem_max = 1048576 [root@n01 ~]# cat /etc/f 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 /usr/sbin/useradd -u 1100 -g oinstall -G dba grid /usr/sbin/useradd -u 1100 -g oinstall -G dba oracle # mkdir -p /u01/app/grid # chown -R grid:oinstall /u01/app/grid # chmod -R 775 /u01/app/grid # mkdir -p /u01/app/oracle # chown -R oracle:oinstall /u01/app/oracle Asianux Server 3, Enterprise Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed: binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-devel-2.2.11 3,配置ntp或ctss 禁用ntp服务器即可 4,配置ssh 11gR2在安装过程中可以自动配置 5,配置asm [root@n01 asm]# rpm -qa|grep oracleasm oracleasm-2.6.18-164.el5-2.0.5-1.el5 oracleasm-support-2.1.3-1.el5 oracleasmlib-2.0.4-1.el5 [root@n01 asm]# oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@n01 asm]# oracleasm listdisks CRS DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 6,安装grid grid用户 runInstaller 三,Oracle Database 11g 建库前需要另建一个asm磁盘组存放数据文件 使用asmca,或者sqlplus均可。 [root@n01 asm]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.CRS.up.type ONLINE ONLINE n01 ora.DATA.up.type ONLINE ONLINE n01 ER.type ONLINE ONLINE n01 N1.type ONLINE ONLINE n01 ora.asm pe ONLINE ONLINE n01 s.type ONLINE ONLINE n01 ora.gsd pe OFFLINE OFFLINE SM1.asm application ONLINE ONLINE n01 01.lsnr application ONLINE ONLINE n01 ora.n01.gsd application OFFLINE OFFLINE s application ONLINE ONLINE n01 ora.n01.1.type ONLINE ONLINE n01 SM2.asm application ONLINE ONLINE n02 02.lsnr application ONLINE ONLINE n02 ora.n02.gsd application OFFLINE OFFLINE s application ONLINE ONLINE n02 ora.n02.1.type ONLINE ONLINE n02 k.type ONLINE ONLINE n01 4j.type ONLINE ONLINE n01 s.type ONLINE ONLINE n01 ora.racdb.se.type ONLINE ONLINE n01 fs.type ONLINE ONLINE n01 ora.scan1.ip.type ONLINE ONLINE n01 |
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论