Oracle11R2安装ASM+RAC配置步骤
rhel6.6-oracle11R2的RAC安装文档
Rhel6.6_Oracle11gR2(ASM,UDEV)的RAC搭建安装本次演示是在Rhel6.6环境下Oracle11gR2的RAC搭建安装环境:VM + Rhel6.6 + GI + Oracle11gR2基本信息1)安装包Rhel6 : rhel-server-6.6-x86_64-dvd.isoOracle11gR2:p1*******_112040_Linux-x86-64_1of7.zipp1*******_112040_Linux-x86-64_2of7.zipGrid Infrastructure(GI):p1*******_112040_Linux-x86-64_3of7.zip2)服务器环境1、两台虚拟机信息:hostname:RAC1 , ip:hostname:RAC2 , ip:72、心跳IP信息:RAC1的心跳IP:192.168.1.106RAC2的心跳IP:192.168.1.1073、VIP/SCANIP信息RAC1的VIP:RAC1的VIP:7ScanIP:8附:关于以上rac的各种ip的详细介绍:3)共享磁盘设置5块2G磁盘,表决磁盘3块5G磁盘,存放数据文件附:虚拟机设置共享磁盘方式:一:安装linux1)linux安装时的选项•Base System > Base•Base System > Client management tools•Base System > Compatibility libraries•Base System > Hardware monitoring utilities•Base System > Large Systems Performance•Base System > Network file system client•Base System > Performance Tools•Base System > Perl Support•Servers > Server Platform•Servers > System administration tools•Desktops > Desktop•Desktops > Desktop Platform•Desktops > Fonts•Desktops > General Purpose Desktop•Desktops > Graphical Administration Tools•Desktops > Input Methods•Desktops > X Window System•Development > Additional Development•Development > Development Tools•Applications > Internet Browser2)linux需要安装的包需要添加以下的包,以确保Oracle的正常安装(暂时不添加也可以,在安装Oracle时会详细提示缺少哪个包的)rpm -Uvh binutils-2.*rpm -Uvh compat-libstdc++-33*rpm -Uvh elfutils-libelf-0.*rpm -Uvh elfutils-libelf-devel-*rpm -Uvh gcc-4.*rpm -Uvh gcc-c++-4.*rpm -Uvh glibc-2.*rpm -Uvh glibc-common-2.*rpm -Uvh glibc-devel-2.*rpm -Uvh glibc-headers-2.*rpm -Uvh pdksh-5*rpm -Uvh libaio-0.*rpm -Uvh libaio-devel-0.*rpm -Uvh libgcc-4.*rpm -Uvh libstdc++-4.*rpm -Uvh libstdc++-devel-4.*rpm -Uvh make-3.*rpm -Uvh sysstat-7.*rpm -Uvh unixODBC-2.*rpm -Uvh unixODBC-devel-2.*二:安装准备注:以下的安装准备都要需要在RAC1和RAC2两个服务器设置。
oracle11gr2rac_安装配置手册
oracle11gr2rac 安装配置手册一:系统检查1,cpu信息查看物理cpu数cat /proc/cpuinfo |grep physical\ id|sort|uniq查看单个cpu corescat /proc/cpuinfo |grep cpu\ cores|uniq查看单个是否超线程cat /proc/cpuinfo |grep sibling|uniq查看cpu总corescat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c2,确认内存大小物理内存504G3,检查文件系统/var和/tmp空间至少2G,建议10G/dev/shm共享空间应当为物理内存/2二:配置系统1,主机正名1节点2节点<记得重新登陆>2,本地hosts解析vi /etc/hosts#public address172.18.62.21 ghintdb01172.18.62.23 ghintdb02#public vip address172.18.62.22 ghintdb01-vip172.18.62.24 ghintdb02-vip172.18.62.25 ghintdb-cluster-scan#private group172.21.44.21 ghintdb01-priv1172.21.44.22 ghintdb02-priv13,修改内核参数shell>vi /etc/sysctl.conf#ORACLE SETTINGfs.aio-max-nr = 1048576fs.file-max = 6815744#{shmall}单位pages,命令"echo $((物理内存/$(getconf PAGESIZE)))" kernel.shmall = 132299730#{shmmax},单位bytes,为物理内存一半,echo $((504*1024*1024*1024/2)) kernel.shmmax = 270582939648kernel.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 = 1048586net.ipv4.ipfrag_high_thresh=524288net.ipv4.ipfrag_low_thresh=393216net.ipv4.tcp_rmem=4096 524288 16777216net.ipv4.tcp_wmem=4096 524288 16777216net.ipv4.tcp_timestamps=0net.ipv4.tcp_sack=0net.ipv4.tcp_window_scaling=1net.core.optmem_max=524287dev_max_backlog=2500 net.ipv4.tcp_mem=16384 16384 16384生效shell>modprobe sunrpcshell>sysctl -p4,关闭防火墙服务chkconfig --level 2345 iptables off chkconfig --level 2345 ip6tables off service iptables stopservice ip6tables stop关闭selinuxset enforce 0vi /etc/selinux/configSELINUX=disabled5,配置ntp同步<主机实施人员步骤,略>增加ntpd启动选项-xvi /etc/sysconfig/ntpdSYNC_HWCLOCK=yesOPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"重启ntpdchkconfig --level 2345 ntpd onservice ntpd start6,创建用户groupadd -g 10501 oinstallgroupadd -g 10502 asmadmingroupadd -g 10503 asmdbagroupadd -g 10504 asmopergroupadd -g 10505 dbagroupadd -g 10506 operuseradd -m -u 10501 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" griduseradd -m -u 10502 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle7,设置用户进程运行资源上限shell>vi /etc/security/limits.conf#ORACLE SETTINGroot soft nproc 2047root hard nproc 16384root soft nofile 1024root hard nofile 65536root soft stack 10240root hard stack 32768grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240grid hard stack 32768oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768三:配置存储1,要求:同一个lun/vdisk在每个节点上设备名一致通过scsi_id确认每一个 lun/vdisk是根据方案从存储上划分正确的共享存储在每个节点能同时读写设备名的属主grid,组主asmadmin,权限660多路径软件配置<主机层实施,略>2,udev绑定参考本文以scsi磁盘为例查看系统识别的scsi盘(sd)fdisk -l|grep Disk\ /dev/sd根据系统人员告知,sda盘是本地硬盘,我们不去动它,剩下的是共享磁盘查看scsi_id命令:scsi_id -gvu /dev/sdN3,编辑udev的rule文件vi /etc/udev/rules.d/99-oracle.rulesKERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0cacf000000a1", NAME="asm-data01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0caeb000000a2", NAME="asm-data02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0cb07000000a3", NAME="asm-data03", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c16f91000000a4", NAME="asm-fra01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c16fab000000a5", NAME="asm-fra02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b0dc3000000dc", NAME="asm-crs01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b35c5000000dd", NAME="asm-crs02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b461a000000de", NAME="asm-crs03", OWNER="grid", GROUP="oinstall", MODE="0660"启动udevstart_udev我们发现原来的磁盘设备名没有了,变成了需要的名字,可以用”fdisk -l /dev/设备名“验证大小,接下来的安装将直接使用该设备名,不需要做fdisk分区4,配置SSH通信:./sshUserSetup.sh -user grid -hosts "ghintdb01 ghintdb02" -advanced -noPromptPassphrase ./sshUserSetup.sh -user oracle -hosts "ghintdb01 ghintdb02" -advanced -noPromptPassphrase5,准备目录和权限(所有节点)mkdir -p /u01/media/oraclechown -R grid:oinstall /u01chmod -R g+w /u016三:上传安装介质使用grid账户登陆,解压前面3个包即可unzip p1*******_112040_Linux-x86-64_1of7.zipunzip p1*******_112040_Linux-x86-64_2of7.zipunzip p1*******_112040_Linux-x86-64_3of7.zip运行安装程序runInstaller(在1节点操作)cd grid./runInstaller提示:为了把x-windows程序的界面投射到终端上,需要执行2个步骤1.启动本地X11Forward程序,推荐x-manager中的xpassive(端口默认6000,注意firewall)2.在服务器上设定shell环境变量:export DISPLAY=YourIP:0.03.执行xclock测试本方案只有一个scan IP,不需要配置GNS,也不需要DNS服务器这3个,可以忽略可以忽略继续了以root身份在所有节点运行指定的脚本一个节点运行完后,再运行其他节点,不可同时运行点击“ok”,最后点“close”关闭编辑~grid/.bash_profile文件,设置grid用户环境变量vi ~grid/.bash_profileexport ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0/gridexport PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatchexport NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'安装数据库软件(在1节点操作)设置/u01/app目录的group组可写chmod g+w /u01/app使用oracle登陆,运行runInstallercd /u01/media/oracle/linux_x64/database export DISPLAY=YourIP:0.0./runInstaller不配置NTP同步,当节点之间的时间有差异时,会影响时间类型数据,RAC也会不稳定确认可以忽略后,选择”next”,然后点击”install“安装啦按照提示,使用root用户执行脚本运行结束后,点击”ok”,然后点击”close”完成安装增加oracle用户的软件环境变量vi ~oracle/.bash_profileexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'注:sid为实例名,rac中为数据库名加节点序列号(重新登陆后生效)创建数据库创建asm diskgroup使用grid用户登陆,执行asmcaexport DISPLAY=yourIP:0.0asmca创建闪回磁盘组(用于存放归档,闪回日志)创建数据库磁盘组,存放数据库文件登陆oracle账户,执行dbca export DISPLAY=YourIP:0.0dbca除非使用者要求,请关闭OEM根据应用要求选择组件oracle text:大文本存取功能oracle olap:联机分析处理oracle spatial:空间数据库,如地图展示数据oracle label security:数据标签安全sample schemas:开发样本enterprise manager repository:oracle企业管理器OEM的资料库oracle warehouse builder:数据仓库综合工具oracle database vault:敏感数据门禁oracle jvm:oracle java虚拟机,在数据库运行javaoracle xml db:支持xml功能oracle mutimedia:图像多媒体等类型数据oracle application express:快速web应用程序开发工具重要!根据应用要求选择字符集,中文一般性是ZHS16GBK缺省区域可以用united states,本例是china,影响时间、数字、币种等本地化表示法默认只有4组日志,每个实例(thread #)2组,每组大小50MB ,会影响性能,需要修改大小和create 更多的日志组,建议每个实例至少5组,每组256MB 或512MB 方案: 1-5组日志分配给thread 1 6-10组日志分配给thread 2每组大小512MB四:应用累计补丁更新程序PSU升级补丁工具opatch在所有节点,使用grid用户登陆,解压opatch升级包p6880880_112000_Linux-x86-64.zip,并整体覆盖$ORACLE_HOME/OPatch目录在所有节点,使用opatch升级包p6880880_112000_Linux-x86-64.zip 并整体覆盖$ORACLE_HOME/OPatch目录补丁1节点软件解压psu补丁包有些补丁需要一些先决条件,oracle一直在努力简化补丁过程,打补丁前务必参考README.html文件创建ocm相应文件(opatchauto模式)运行升级程序root登陆加载grid环境变量(. ~grid/.bash_profile)运行opatch工具。
oracle11gR2_asm安装
Oracle 11gR2 for Linux 安装一.硬、软件环境:1.硬件:IBM x3650 M2,2颗Intel Xeon E54052.0Ghz CPU,2G*2=4G内存,3块146G SAS硬盘,做raid0配置。
2.软件:RHEL5.4 32位版本,linux_11gR2_grid,linux_11gR2_database,SecureCRT6.1,Xmanager3.0。
注:Xmanager3.0用于上传软件文件和x窗口映射。
二.安装完操作系统后以root用户创建oracle相关的用户和组参照oracle的官方文档,创建两个用户grid和oracle,grid用户用来安装grid 软件,oracle用户安装oracle软件,数据库文件使用ASM管理。
注:#开头的命令对应root用户执行,$开始的命令对应grid和oracle用户首先,创建四个组oinstall, dba, asmadmin, asmdba:#groupadd -g 1000 oinstall#groupadd -g 1100 dba#groupadd -g 1200 asmadmin#groupadd -g 1300 asmdba再创建两个用户grid和oracle:#useradd -u 1001 -g oinstall -G asmdba,asmadmin,dba grid#passwd grid#useradd -u 1002 -g oinstall -G dba,asmdba oracle#passwd oracle创建目录和授权:#mkdir -p /u01/app/grid 注:此目录用来安装grid软件#chown -R grid:oinstall /u01#chmod -R 775 /u01#mkdir -p /u02/app/oracle 注:此目录用来安装oracle软件#chown -R oracle:oinstall /u02#chmod -R 775 /u02三.所需的rpm包,参照oracle官方文档,根据不同的操作系统版本,rpm包的版本有所区别,包名肯定是一样的。
Oracle-RAC以及ASM安装全过程整理
RAC以及ASM安装全过程整理RAC以及ASM安装全过程整理更改主机名第一步:#hostname oratest第二步:修改/etc/sysconfig/network中的hostname第三步:修改/etc/hosts文件设置hosts文件可参考:[root@amdocs01 mapper]# cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.localhostamdocs02amdocs02-vipamdocs02-priv设置IPeth01eth1绑定裸设备先在逻辑卷组上分出逻辑卷,全部为裸设备,必须包含:逻辑盘:ocrlv ,votelv 是必须的,因为后面安装ASM要用到data01,data02,data03,data04,data05,softlv,oralv可选1、裸设备定义:一块没有分区的硬盘,称为原始设备(RAWDEVICE)或者是一个分区,但是没有用EXT3,OCFS等文件系统格式化,称为原始分区(RAWPARTITION)以上两者都是裸设备2、裸设备的绑定有文件系统的分区是采用mount的方式挂载到某一个挂载点的(目录)而裸设备不能mount,只能绑定到/dev/raw/下的某一个设备名比如/dev/raw/raw13、裸设备的绑定方法先介绍第一种方法:修改/etc/sysconfig/rawdevices,添加以下内容,这里sdd1和sdd2是原始分区名或者原始设备(硬盘)名,raw1和raw2是/dev目录下的原始设备名,编号从raw1到raw8191,也就是最多可以绑定255个裸设备/dev/raw/raw1/dev/sdd1/dev/raw/raw2/dev/sdd2然后修改裸设备的属主和访问权限chown oracle:dba /dev/raw/raw1chown oracle:dba /dev/raw/raw2chmod 660 /dev/raw/raw1chmod 660 /dev/raw/raw2最后使得裸设备生效,并且在机器启动的时候就自动加载执行/sbin/chkconfig rawdevices on保证机器启动的时候裸设备能够加载,这一步很重要裸设备的绑定方法第二种方法,修改文件的方法#!/bin/sh## This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff.touch /var/lock/subsys/localraw /dev/raw/raw1 /dev/mapper/vg00-ocrlvraw /dev/raw/raw2 /dev/mapper/vg00-votelvraw /dev/raw/raw3 /dev/mapper/vg00-data01raw /dev/raw/raw4 /dev/mapper/vg00-data02raw /dev/raw/raw5 /dev/mapper/vg00-data03raw /dev/raw/raw6 /dev/mapper/vg00-data04chmod 775 /dev/raw/raw1chmod 775 /dev/raw/raw2chmod 775 /dev/raw/raw3chmod 775 /dev/raw/raw4chmod 775 /dev/raw/raw5chmod 775 /dev/raw/raw6chown oracle:dba /dev/raw/raw1chown oracle:dba /dev/raw/raw2chown oracle:dba /dev/raw/raw3chown oracle:dba /dev/raw/raw4chown oracle:dba /dev/raw/raw5chown oracle:dba /dev/raw/raw6chown oracle:dba /dev/raw/raw7modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=1804、裸设备的读写不能用cp等命令操作,写入内容用dd命令,可以参阅相关资料5、清空裸设备相当于格式化啦bs是快的大小,blocksizecount是快的数量,这两者相乘大于裸设备的容量即可ddif=/dev/zeroof=/dev/raw/raw1bs=8192count=12800ddif=/dev/zeroof=/dev/raw/raw2bs=8192count=12800-------另外,注意:rhel4使用udev来管理设备手动修改/dev/raw/raw1不能永久生效要想使得权限持久生效raw/*:root:disk:0660改成raw/*:oracle:dba:0660重启机器如果/dev/下没有/raw/目录,可以自己手工建立。
Oracle 11gR2 +ASM install for RedHat 5.4 x86_64
Oracle 11gr2 +ASM for RedHat 5.4 X86_642014/03/14 目录一、安装前准备 (3)1、安装环境 (3)2、挂载iscsi存储 (3)2.1、扫描可用的iscsi磁盘设备 (3)2.2、挂载iscsi设备并对挂载成功的设备进行fdisk (3)2.3、最终挂载成功的iscsi磁盘设备,如红圈中所示 (3)3、配置udev(创建ASM磁盘) (4)3.1、获取ISCSI设备的唯一标示符 (4)3.2、创建规范文件 (4)3.3、在规则文件中添加如下内容 (4)4、启动udev (4)5、创建用户和组 (4)6、创建相关目录并修改相应的访问权限 (4)7、配置内核参数 (4)8、为Oracle和grid 用户设置Shell限制 (5)8.1、在/etc/security/limits.conf中添加如下内容 (5)8.2、在/etc/pam.d/login中添加如下内容 (5)8.3、在/etc/profile中添加如下内容 (5)9、系统中需要安装以下Rpm包,如果没有安装则进行安装 (5)10、Rpm包检查 (6)11、配置相关用户环境变量 (6)11.1、配置grid用户环境变量 (6)11.2、配置ORACLE用户环境变量 (6)12、上传Oracle软件 (6)13、解压软件 (6)二、安装Grid软件 (7)1、Grid用户下运行OUI安装程序,如图-1所示,等待数秒出现如图-2所示界面 (7)2、选择“Skip software updates”,然后点“Next” (8)3、选择“Configure Oracle Infrastructure for a Standalog server”,然后点“Next” (8)4、选择语言,然后点“Next” (9)5、创建ASM磁盘组 (9)6、设置ASM密码,然后点“Next” (10)7、操作系统组权限设置 (10)8、指定grid安装路径 (11)9、创建oraInventory (11)10、先决条件检查 (12)11、选择“Ignore All”,然后点“Next” (12)12、点Install,开始安装grid软件 (13)13、安装进度 (13)14、根据提示执行相关脚本 (14)15、执行过程如下 (14)16、点Close结束grid安装 (17)三、安装Oracle Database软件 (18)1、Oracle用户下运行OUI安装程序 (18)2、去除“I wish to receive security updates via my oracle support”前面的“√”,然后点Next (18)3、选择“Skip software updates”然后点Next (19)4、选择“Install database software only”,然后点next (19)5、选择“Single instance database installation” (20)6、语言选择 (20)7、选择数据库版本 (21)8、指定安装路径 (21)9、操作系统组权限设置 (22)10、先决条件检查 (22)11、点“Ignore All”,然后点Next (23)12、点“Yes”继续下一步安装 (23)13、点Install (24)14、安装进度 (24)15、根据提示执行相关脚本 (25)16、执行过程如下 (25)17、点Close结束Oracle Database 安装 (26)四、DBCA建库 (26)1、在Oracle用户命令行下运行“dbca” (26)2、选择Create a Database (27)3、选择“General Purpose Transaction Processing”,然后点Next (27)4、设置全局数据库名和SID (28)5、禁用OEM (28)6、禁用自动维护任务 (29)7、设置用户口令 (29)8、选择存储类型 (30)9、禁用闪回 (30)10、点Next (31)11、内存设置 (31)12、进程数设置 (32)13、字符集设置 (32)14、连接模式设置 (33)15、物理文件存储路径 (33)16、选择“Create Database” (34)17、点OK,开始创建数据库 (34)18、数据库创建进度 (35)19、点Exit结束创建 (35)五、其它 (36)1、gird_home相关问题 (36)2、内核参数问题 (37)3、小结 (38)一、安装前准备1、因为Oracle 11gR2中,ASM必须单独安装Grid Infrastructure,再加上数据库软件的安装,所需要的磁盘大小一般不超过8G,所以应保证/opt目录所在的文件系统可用空间在8G以上即可。
Oracle11gR2RAC+ASM+Grid安装
Oracle11gR2RAC+ASM+Grid安装(⼀)环境准备主机操作系统windows10虚拟机平台vmware workstation 12虚拟机操作系统redhat 5.5 x86(32位) :Linux.5.5.for.x86.rhel-server-5.5-i386-dvd.isogrid版本linux_11gR2_grid.zip (32位)oracle版本linux_11gR2_database_1of2 和 linux_11gR2_database_2of2(32位)共享存储ASM(⼆)操作系统安装(2.1)操作系统安装操作系统安装相对⽽⾔较简单,不做详述。
系统的配置信息⼤致如下,后⾯还会根据需要添加和删除设备(2.2)安装VM Tools为了⽅便在主机与虚拟机之间进⾏⽂件拖拽、复制粘贴、使⽤共享⽂件夹等功能,我们需要安装VM Tools,VM Tools的安装包已经集合在了vmware workstation⾥⾯了。
下⾯⼀步⼀步安装VM Tools。
step 1:虚拟机-> 安装Vmware Toolsstep 2: mount查看是否装载 VMware Tools 虚拟 CD-ROM 映像,如果有红⾊部分,说明已经将VM tools安装包mount在了/media⽬录下step 3:转到安装⽬录/tmp,解压VM tools安装包step 4:开始安装VM Tools[root@Redhat tmp]# cd vmware-tools-distrib[root@Redhat vmware-tools-distrib]#./vmware-install.pl遇到选项,直接回车即可。
step 5:安装结束,重启虚拟机[root@rac1 ~]# rebootstep6:测试VM Tools安装是否成功从主机拖到⼀个⽂档到虚拟机,如果拖动成功,说明VM Tools已经安装成功(三)操作系统配置(3.1)⽹络配置(3.1.1)主机名配置①节点1:[root@rac1 ~]# vim /etc/sysconfig/networkNETWORKING=yesNETWORKING_IPV6=noHOSTNAME=rac1②节点2:[root@rac2 ~]# vim /etc/sysconfig/networkNETWORKING=yesNETWORKING_IPV6=noHOSTNAME=rac2(3.1.2)IP配置为了使⽤静态IP配置数据库,我⼜为每台虚拟机新增加了⼀块⽹卡,将其配置成only-host模式,新增⽹卡⽅式如下:step1:添加⽹络点击vmware的“编辑”-> “虚拟⽹络编辑器”-> “更改设置”-> “添加⽹络”,按下图选择,保存step2:在两台虚拟机上添加⽹卡选择虚拟机,“设置”->“添加”->“⽹络适配器”,选择“⾃定义”,这个⾃定义是我们上⼀步定义的⽹络,结果如下:step3:根据⽹络设置,我们规划IP地址如下:接下来就是配置IP地址了,对于节点1(主机名:rac1),我们:①配置eth1--或删除BOOTPROTO--不要修改硬件地址--设置⽹卡为开机启动--增加IP和MASK[root@rac1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1#修改下⾯红⾊部分# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth1# BOOTPROTO=dhcpHWADDR=00:0C:29:9C:DF:6AONBOOT=yes IPADDR=192.168.19.10NETMASK=255.255.255.0②配置eth2[root@rac1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth2# 修改红⾊部分# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth2# BOOTPROTO=dhcpONBOOT=yesHWADDR=00:0C:29:6G:8C:5F=192.168.15.10NETMASK=255.255.255.0对于节点2(主机名:rac2),我们参照节点1即可:①配置eth1[root@rac2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth1# BOOTPROTO=dhcp ONBOOT=yesHWADDR=00:0c:29:b0:4e:b6IPADDR=192.168.19.11NETMASK=255.255.255.0②配置eth2[root@rac2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth2 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth2# BOOTPROTO=dhcpONBOOT=yesHWADDR=00:0c:29:b0:4e:c0IPADDR=192.168.15.11NETMASK=255.255.255.0(3.1.3)hosts⽂件配置在2个节点上配置hosts⽂件,以节点1为例[root@rac1 ~]# vim /etc/hosts# 在⽂件的最后⾯加上#eth1 public192.168.19.10 rac1192.168.19.11 rac2#virtual192.168.19.12 rac1-vip192.168.19.13 rac2-vip192.168.15.10 rac1-priv192.168.15.11 rac2-priv#scan192.168.19.14 rac-scan配置完成后,重启⽹卡[root@rac1 ~]# service network restart重启⽹卡时,遇到了⼀个⼩错误,提⽰:Device eth2 has different MAC address than expected, ignoring.[FAILED]看了其他⼈的⽂章,发现是⽹卡配置⽂件⾥⾯的MAC地址与实际虚拟机的MAC地址不⼀样,解决办法如下:step1:查看本机实际MAC地址(红⾊部分)[root@rac1 ~]# ifconfig eth2eth2 Link encap:Ethernet HWaddr 00:0C:29:9C:DF:7Einet addr:192.168.15.10 Bcast:192.168.15.255 Mask:255.255.255.0inet6 addr: fe80::20c:29ff:fe9c:df7e/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:30677 errors:0 dropped:0 overruns:0 frame:0TX packets:26377 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:15839769 (15.1 MiB) TX bytes:10819637 (10.3 MiB)Interrupt:83 Base address:0x2824step2:查看我们配置的MAC地址[root@rac1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth2# 修改红⾊部分# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth2# BOOTPROTO=dhcpONBOOT=yesHWADDR=00:0C:29:6G:8C:5FIPADDR=192.168.15.10NETMASK=255.255.255.0发现我们配置的MAC地址与实际的MAC地址不⼀样,修改⽹卡step2⾥⾯的MAC地址,重启⽹卡。
Oracle 11gR2 RAC 安装配置 - gentoofly - 博客
mhtml:file://E:\bk\rac有关\Oracle 11gR2 RAC 安装配置 - gentoofly - 博客园.mht
2015/7/24
w
页码,2/15(W)
Copyright ©2015 gentoofly
172.168.1.192 rac2-priv rac2-priv.localdomain #Virtual 虚拟IP地址 192.168.1.172 rac1-vip rac1-vip.localdomain 192.168.1.174 rac2-vip rac2-vip.localdomain #SCAN 192.168.1.176 rac-cluster rac-cluster-scan 创建oracle用户和grid用户 在两台服务器上分别执行下列操作 [root@rac1 ~]# groupadd -g 5000 asmadmin [root@rac1 ~]# groupadd -g 5001 asmdba [root@rac1 ~]# groupadd -g 5002 asmoper [root@rac1 ~]# groupadd -g 6000 oinstall [root@rac1 ~]# groupadd -g 6001 dba [root@rac1 ~]# groupadd -g 6002 oper [root@rac1 ~]# useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/gr id -s /bin/bash grid #创建grid用户,这个用户属于oinstall组,附加组有asmadmin,asmdba,asmoper [root@rac1 ~]# useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bi n/bash oracle #创建oracle用户,这个用户属于oinstall组,附加组有asmadmin,asmdba,asmoper [root@rac1 ~]# mkdir -p /oracle/app/grid [root@rac1 ~]# mkdir -p /oracle/app/11.2.0/grid [root@rac1 ~]# mkdir -p /oracle/app/oracle [root@rac1 ~]# passwd oracle [root@rac1 ~]# passwd grid [root@rac1 ~]# chown -R grid:oinstall /oracle/app/grid [root@rac1 ~]# chmod -R 775 /oracle/app/grid [root@rac1 ~]# chown -R grid:oinstall /oracle/app/11.2.0/grid [root@rac1 ~]# chmod -R 775 /oracle/app/11.2.0/grid [root@rac1 ~]# chown -R oracle:oinstall /oracle/app/oracle [root@rac1 ~]# chmod -R 775 /oracle/app/oracle 设置oracle用户和grid用户的环境变量 设置oracle用户环境变量,在两个节点上执行下列操作,注意两节点的ORACLE_SID是不同的 [oracle@rac1 ~]# vim .bash_profile # Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=rac1.localdomain; export ORACLE_HOSTNAME ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=RAC1; export ORACLE_SID #注意这里,在主机rac1上,它的实例名为RAC1 而在rac2主机,它的实例名RAC2 ORACLE_TERM=xterm; export ORACLE_TERM BASE_PATH=/usr/sbin:$PATH; export BASE_PATH PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
Oracle RAC 11gR2三节点ASM+MultiPath安装部署实施步骤
Oracle RAC 11gR2三节点安装部署实施步骤(一)集群规划1.硬件环境服务器3台:DELL PowerEdge R620,2*Xeon E5-2680v2,128G内存,2*160G SSD硬盘,2*8Gbps HBA卡存储:DELL PowerV oult MD3660f,48*1TB 7.2k SAS硬盘,双控制器,8光纤口连接方式:通过SAN交换机,每台服务器双光纤接入到SAN交换机,MD3660f采用8光纤接入到SAN交换机。
2.软件环境数据库:oracle11.2.0.3_Linux-x86-64集群件:oracle11.2.0.3_grid-x86-64操作系统:oracle linux server6.5(二)IP 规划 每个节点一个public IP每个节点一个public VIP 每个节点一个private IP 一个用于集群的SCAN 名称和一到三个和public IP 同网段的IP,本处用一个public IP,VIP 和private IP 写入/etc/hosts 文件scan配置本地/etc/hosts解析(三)安装目录规划建立/opt/oracle 文件系统用来安装grid、datbase 程序。
Oracle 用户:ORACLE_BASE= /opt/oracle/appORACLE_HOME=$ORACLE_BASE/product/11.2.0Grid 用户:ORACLE_BASE= /opt/oracle/grid/appORACLE_HOME= /opt/oracle/grid/11.2.0(四)存储规划(五)安装实施1.安装前准备存储环境准备将主机、存储等接入SAN 交换机,按需划分相应的zone;清理所有设备的WWN 号;在存储端添加数据库主机,将两节点绑定为一个Host set;存储划分VV,并分配给数据库Host set。
2.主机环境准备操作系统安装分别在两个节点安装oracle linux server6.5 操作系统。
oracle11g+asm+rac安装指南linux
oracle11g+asm+rac安装指南linuxoracle11g+asm+rac安装指导环境描述:网络接口、ip分配:#publicbind0192.100.65.19tpps-ora01192。
100.65.20tpps-ora02#vip192.100.65.21tpps-ora01-vip192.100.65.22tpps-ora02-vip#私人的172.16.65.19tpps-ora01-priv172.16.65.20tpps-ora02-priv#扫描192.100.65.23orascan主机名:修改hostname如主节点tpps-ora01,次节点tpps-ora02注:图中rac01改为tpps-ora01,rac02改为tpps-ora02,以下各图均按此方式操作。
[ root@localhost~]#vi/etc/sysconfig/network关闭selinux配置:[ root@localhost~]#cat/etc/selinux/config#thisfilecontrolsthestateofselinuxonthesystem.#selinux=cantakeoneofthesethreev alues:#强制执行SELinuxSecurity政策。
#permissive-selinuxprintswarningsinsteadofenforcing.#disabled-selinuxisfullydisabled.selinux=disabled#selinuxtype=政策的类型。
可能的价值是:#targeted-onlytargetednetworkdaemonsareprotected.#strict-fullselinuxprotection.selinuxtype=targeted关闭防火墙:[ root@localhost~]#chkconfig——列表表iptables0:off1:off2:on3:on4:on5:on6:off[root@localhost~]#chkconfigiptablesoff[ root@localhost~]#chkconfig--listiptablesiTables0:off1:off2:off3:off4:off5:off6:off1.检查每个节点的os环境1.检查可用空间:○[root@localhost~]#df-hFileSystemSizeUse%mountedon/dev/sda2124g4.2g114g4%//dev/sda1494m17m452m4%/boottmpfs2。
oracle11gr2rac_安装配置手册
oracle11gr2rac 安装配置手册一:系统检查1,cpu信息查看物理cpu数cat /proc/cpuinfo |grep physical\ id|sort|uniq查看单个cpu corescat /proc/cpuinfo |grep cpu\ cores|uniq查看单个是否超线程cat /proc/cpuinfo |grep sibling|uniq查看cpu总corescat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c2,确认内存大小物理内存504G3,检查文件系统/var和/tmp空间至少2G,建议10G/dev/shm共享空间应当为物理内存/2二:配置系统1,主机正名1节点2节点<记得重新登陆>2,本地hosts解析vi /etc/hosts#public address172.18.62.21 ghintdb01172.18.62.23 ghintdb02#public vip address172.18.62.22 ghintdb01-vip172.18.62.24 ghintdb02-vip172.18.62.25 ghintdb-cluster-scan#private group172.21.44.21 ghintdb01-priv1172.21.44.22 ghintdb02-priv13,修改内核参数shell>vi /etc/sysctl.conf#ORACLE SETTINGfs.aio-max-nr = 1048576fs.file-max = 6815744#{shmall}单位pages,命令"echo $((物理内存/$(getconf PAGESIZE)))" kernel.shmall = 132299730#{shmmax},单位bytes,为物理内存一半,echo $((504*1024*1024*1024/2)) kernel.shmmax = 270582939648kernel.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 = 1048586net.ipv4.ipfrag_high_thresh=524288net.ipv4.ipfrag_low_thresh=393216net.ipv4.tcp_rmem=4096 524288 16777216net.ipv4.tcp_wmem=4096 524288 16777216net.ipv4.tcp_timestamps=0net.ipv4.tcp_sack=0net.ipv4.tcp_window_scaling=1net.core.optmem_max=524287dev_max_backlog=2500 net.ipv4.tcp_mem=16384 16384 16384生效shell>modprobe sunrpcshell>sysctl -p4,关闭防火墙服务chkconfig --level 2345 iptables off chkconfig --level 2345 ip6tables off service iptables stopservice ip6tables stop关闭selinuxset enforce 0vi /etc/selinux/configSELINUX=disabled5,配置ntp同步<主机实施人员步骤,略>增加ntpd启动选项-xvi /etc/sysconfig/ntpdSYNC_HWCLOCK=yesOPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"重启ntpdchkconfig --level 2345 ntpd onservice ntpd start6,创建用户groupadd -g 10501 oinstallgroupadd -g 10502 asmadmingroupadd -g 10503 asmdbagroupadd -g 10504 asmopergroupadd -g 10505 dbagroupadd -g 10506 operuseradd -m -u 10501 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" griduseradd -m -u 10502 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle7,设置用户进程运行资源上限shell>vi /etc/security/limits.conf#ORACLE SETTINGroot soft nproc 2047root hard nproc 16384root soft nofile 1024root hard nofile 65536root soft stack 10240root hard stack 32768grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240grid hard stack 32768oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768三:配置存储1,要求:同一个lun/vdisk在每个节点上设备名一致通过scsi_id确认每一个 lun/vdisk是根据方案从存储上划分正确的共享存储在每个节点能同时读写设备名的属主grid,组主asmadmin,权限660多路径软件配置<主机层实施,略>2,udev绑定参考本文以scsi磁盘为例查看系统识别的scsi盘(sd)fdisk -l|grep Disk\ /dev/sd根据系统人员告知,sda盘是本地硬盘,我们不去动它,剩下的是共享磁盘查看scsi_id命令:scsi_id -gvu /dev/sdN3,编辑udev的rule文件vi /etc/udev/rules.d/99-oracle.rulesKERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0cacf000000a1", NAME="asm-data01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0caeb000000a2", NAME="asm-data02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c0cb07000000a3", NAME="asm-data03", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c16f91000000a4", NAME="asm-fra01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a1e7c16fab000000a5", NAME="asm-fra02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b0dc3000000dc", NAME="asm-crs01", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b35c5000000dd", NAME="asm-crs02", OWNER="grid", GROUP="oinstall", MODE="0660"KERNEL=="dm-*", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36a08cf81005732a10f5b461a000000de", NAME="asm-crs03", OWNER="grid", GROUP="oinstall", MODE="0660"启动udevstart_udev我们发现原来的磁盘设备名没有了,变成了需要的名字,可以用”fdisk -l /dev/设备名“验证大小,接下来的安装将直接使用该设备名,不需要做fdisk分区4,配置SSH通信:./sshUserSetup.sh -user grid -hosts "ghintdb01 ghintdb02" -advanced -noPromptPassphrase ./sshUserSetup.sh -user oracle -hosts "ghintdb01 ghintdb02" -advanced -noPromptPassphrase5,准备目录和权限(所有节点)mkdir -p /u01/media/oraclechown -R grid:oinstall /u01chmod -R g+w /u016三:上传安装介质使用grid账户登陆,解压前面3个包即可unzip p1*******_112040_Linux-x86-64_1of7.zipunzip p1*******_112040_Linux-x86-64_2of7.zipunzip p1*******_112040_Linux-x86-64_3of7.zip运行安装程序runInstaller(在1节点操作)cd grid./runInstaller提示:为了把x-windows程序的界面投射到终端上,需要执行2个步骤1.启动本地X11Forward程序,推荐x-manager中的xpassive(端口默认6000,注意firewall)2.在服务器上设定shell环境变量:export DISPLAY=YourIP:0.03.执行xclock测试本方案只有一个scan IP,不需要配置GNS,也不需要DNS服务器这3个,可以忽略可以忽略继续了以root身份在所有节点运行指定的脚本一个节点运行完后,再运行其他节点,不可同时运行点击“ok”,最后点“close”关闭编辑~grid/.bash_profile文件,设置grid用户环境变量vi ~grid/.bash_profileexport ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0/gridexport PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatchexport NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'安装数据库软件(在1节点操作)设置/u01/app目录的group组可写chmod g+w /u01/app使用oracle登陆,运行runInstallercd /u01/media/oracle/linux_x64/database export DISPLAY=YourIP:0.0./runInstaller不配置NTP同步,当节点之间的时间有差异时,会影响时间类型数据,RAC也会不稳定确认可以忽略后,选择”next”,然后点击”install“安装啦按照提示,使用root用户执行脚本运行结束后,点击”ok”,然后点击”close”完成安装增加oracle用户的软件环境变量vi ~oracle/.bash_profileexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'注:sid为实例名,rac中为数据库名加节点序列号(重新登陆后生效)创建数据库创建asm diskgroup使用grid用户登陆,执行asmcaexport DISPLAY=yourIP:0.0asmca创建闪回磁盘组(用于存放归档,闪回日志)创建数据库磁盘组,存放数据库文件登陆oracle账户,执行dbca export DISPLAY=YourIP:0.0dbca除非使用者要求,请关闭OEM根据应用要求选择组件oracle text:大文本存取功能oracle olap:联机分析处理oracle spatial:空间数据库,如地图展示数据oracle label security:数据标签安全sample schemas:开发样本enterprise manager repository:oracle企业管理器OEM的资料库oracle warehouse builder:数据仓库综合工具oracle database vault:敏感数据门禁oracle jvm:oracle java虚拟机,在数据库运行javaoracle xml db:支持xml功能oracle mutimedia:图像多媒体等类型数据oracle application express:快速web应用程序开发工具重要!根据应用要求选择字符集,中文一般性是ZHS16GBK缺省区域可以用united states,本例是china,影响时间、数字、币种等本地化表示法默认只有4组日志,每个实例(thread #)2组,每组大小50MB ,会影响性能,需要修改大小和create 更多的日志组,建议每个实例至少5组,每组256MB 或512MB 方案: 1-5组日志分配给thread 1 6-10组日志分配给thread 2每组大小512MB四:应用累计补丁更新程序PSU升级补丁工具opatch在所有节点,使用grid用户登陆,解压opatch升级包p6880880_112000_Linux-x86-64.zip,并整体覆盖$ORACLE_HOME/OPatch目录在所有节点,使用opatch升级包p6880880_112000_Linux-x86-64.zip 并整体覆盖$ORACLE_HOME/OPatch目录补丁1节点软件解压psu补丁包有些补丁需要一些先决条件,oracle一直在努力简化补丁过程,打补丁前务必参考README.html文件创建ocm相应文件(opatchauto模式)运行升级程序root登陆加载grid环境变量(. ~grid/.bash_profile)运行opatch工具。
p570安装操作系统及ORACLE11gR2+RAC+ASM
AIX6.1+Oracle11g R2+ASM+RAC安装步骤一、安装AIX操作系统注意事项:1、重新启动服务器2、按5进入BOOT顺序启动3、选择全新安装4、选择安装磁盘为hdisk05、选择安装SERVER组件6、安装完成以后设置VT100、时间、ROOT用户密码7、设置p1机器名wxrac1网络en0 172.10.0.1 en1 10.100.100.1 网关172.10.0.2548、设置p2机器名wxrac2网络en0 172.10.0.2 en1 10.100.100.2 网关172.10.0.2549、设置时区chtz BEIST-8二、安装SSH1、FTP上传openssl、openssh目录到零时目录2、先安装openssl,再按照openssh三、Bash的安装1、安装bash: rpm -ihv bash-3.2-1.aix5.2.ppc.rpm2、安装unzip:rpm -ivh unzip*.rpm3、创建~/.profile,内容: export PS1="[\u@\h \W]#"4、修改/etc/security/login.cfg,在shells属性添加bash命令: shells = /bin/bash,/bin/sh,/bin/bsh......四、安装补丁1、Smitty easy_install,安装光盘补丁APP_DEV ,CDE2、先添加rsct组件(AIX默认没有安装该组件)bos.adt.basebos.adt.libbos.adt.libmbos.perf.libperfstat 6.1.2.1 or laterbos.perf.perfstatbos.perf.proctoolsrsct.basic.rtepat.clients.rtexlC.aix61.rte 10.1.0.0 (or later)3、安装AIX补丁ftp上传6100-6补丁smitty update_all(第一运行以后发现系统号为6100-5,再次运行后正常)4、重新启动五、调整目录空间以root用户执行chfs -a size=2G /chfs -a size=2G /homechfs -a size=5G /usrchfs -a size=20G /tmpchfs -a size=2G /varchfs -a size=5G /opt调整交换分区大小20g(默认512M,一个块256M)smitty chps输入块数78六、拷贝文件、解压FTP上传aix.ppc64_11gR2_grid.zipaix.ppc64_11gR2_database_1of2.zipaix.ppc64_11gR2_database_1of2.zip用unzip 解压unzip aix.ppc64_11gR2_grid.zip –d /tmp #解压到/tmp/gridunzip aix.ppc64_11gR2_database_1of2.zip –d /tmpunzip aix.ppc64_11gR2_database_2of2.zip –d /tmp数据库文件解压到一个文件夹/tmp/database目录中七、编辑Host[root@wxrac1 ~]#vi /etc/hosts# Oracle Clusterware Public nodes list172.10.0.1 wxrac1172.10.0.2 wxrac2# Oracle Clusterware Virtual IP nodes list172.10.0.11 wxrac1-vip172.10.0.12 wxrac2-vip# Oracle Clusterware and RAC Interconnect10.100.100.1 wxrac1-priv10.100.100.2 wxrac2-priv172.10.0.15 wxgh-scan#由于网络环境缘故,本次安装未使用DNS服务器,所以将SCAN放在hosts文件中八、创建用户和文件系统,大小30G1、创建用户组和用户mkgroup -'A' id='1000' adms='root' oinstallmkgroup -'A' id='1200' adms='root' asmadminmkgroup -'A' id='1201' adms='root' asmdbamkgroup -'A' id='1202' adms='root' asmopermkuser id='500' pgrp='oinstall' groups=' asmadmin,asmdba,asmoper ' home='/home/grid' grid mkgroup -'A' id='1300' adms='root' dbamkgroup -'A' id='1301' adms='root' opermkuser id='501' pgrp='oinstall' groups=' dba,oper,asmdba' home='/home/oracle' oraclechuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE gridchuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle设置grid和oracle用户密码Passwd gridPasswd oracle2、创建文件系统(数据库安装目录配置大一点,后期升级数据库时该目录空间必须大于20G)crfs -v jfs2 -g 'rootvg' -a size='60G' -m '/u01' -A 'yes' -p 'rw'3、挂载mount /u014、修改目录权限mkdir -p /u01/app/gridmkdir -p /u01/app/11.2.0/gridchown -R grid:oinstall /u01mkdir -p /u01/app/oraclechown -R oracle:oinstall /u01/app/oraclechmod -R 775 /u015、创建备份文件系统/bk,大小30Gcrfs -v jfs2 -g 'rootvg' -a size='40G' -m '/bk' -A 'yes' -p 'rw'mount /bkmkdir -p /bk/old_bkmkdir -p /bk/new_bkchown -R oracle:dba /bkchmod -R 755 /bk九、用户环境变量设置在两台服务器的的grid用户的.profile最后,增加如下内容:GIRD用户(WXRAC1):在.profile文件中添加umask 022export PS1="[\u@\h \W]#" #设置登录格式export DISPLAY=192.168.0.6:0.0 #这个是为了将屏幕输出客户端上面,地址可能不同export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0/grid # ORACLE_HOME不能是ORACLE_BASE的子目录,因为安装以后会修改目录权限export ORACLE_SID=+ASM1 #节点2 是+ASM2export NLS_LANG= AMERICAN_AMERICA.ZHS16GBKexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexport PATH=${PATH}:$ORACLE_HOME/OPatchexport ORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/adminexport ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport ORA_NLS10=$ORACLE_HOME/nls/dataexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmpGIRD用户(WXRAC2):在.profile文件中添加umask 022DISPLAY=192.168.0.6:0.0;export DISPLAYexport PS1="[\u@\h \W]#"export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0/gridexport ORACLE_SID=+ASM2export NLS_LANG= AMERICAN_AMERICA.ZHS16GBKexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexport PATH=${PATH}:$ORACLE_HOME/OPatchexport ORACLE=PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport ORA_NLS10=$ORACLE_HOME/nls/dataexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmpORACLE用户(WXRAC1):在.profile文件中添加DISPLAY=192.168.0.6:0.0;export DISPLAYexport PS1="[\u@\h \W]#"umask 022export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=wxgh1export ORACLE_UNQNAME=wxghexport NLS_LANG= AMERICAN_AMERICA.ZHS16GBKexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexport PATH=${PATH}:$ORACLE_HOME/OPatchexport ORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport ORA_NLS10=$ORACLE_HOME/nls/dataexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmpORACLE用户(WXRAC2):在.profile文件中添加DISPLAY=192.168.0.6:0.0;export DISPLAYexport PS1="[\u@\h \W]#"umask 022export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=wxgh2export ORACLE_UNQNAME=wxghexport NLS_LANG= AMERICAN_AMERICA.ZHS16GBKexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexport PATH=${PATH}:$ORACLE_HOME/OPatchexport ORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport ORA_NLS10=$ORACLE_HOME/nls/dataexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmp注意:因为环境参数设置在用户登录时候起作用,必须做如下修改以grid和oracle用户登录Xmanager后,修改两台机器的.dtprofile(该文件在打开Xmanager软件以后生成)文件,将#DTSOURCEPROFILE=true的#注释符去掉安装bash以后可能.profile不是每次均起作用,拷贝文件到.bashrc(不一定需要)cp .profile .bashrc十、调整参数1.调整最大进程数chdev -l sys0 -a maxuproc=16384查看lsattr -El sys0 -a maxuproc调整最小块数chdev -l sys0 -a ncargs=256lsattr -El sys0 -a ncargs2.Oracle推存使用vmo命令去调优虚拟内存管理vmo -p -o minperm%=3vmo -p -o maxperm%=90vmo -p -o maxclient%=90vmo -p -o lru_file_repage=0vmo -p -o strict_maxclient=1vmo -p -o strict_maxperm=0在AIX6中,这些命令必须一行一行进行,因为要输入YES/NO,不知道是否必须这样?可以通过vmo -L lru_file_repage命令查看结果vmo -L minperm%vmo -L maxperm%vmo -L maxclient%vmo -L lru_file_repagevmo -L strict_maxclientvmo -L strict_maxperm3.调整SHELL限制在/etc/security/limits文件中修改如下行:default:fsize = -1core = 2097151cpu = -1data = -1rss = -1stack = -1nofiles = -14.修改网络参数,用lsattr -El sys0 -a pre520tune检查是否兼容性,如果结果是pre520tune disable Pre-520 tuning compatibility mode True,则说明是不兼容性模式,则用以下命令调整(默认是不兼容模式)no -r -o ipqmaxlen=521no -p -o rfc1323=1no -p -o sb_max=1500000no -p -o tcp_recvspace=65536no -p -o tcp_sendspace=65536no -p -o udp_recvspace=1351680no -p -o udp_sendspace=13516如果是兼容模式,编辑文件/etc/加入下面内容:if [ -f /usr/sbin/no ] ; then/usr/sbin/no -o udp_sendspace=65536/usr/sbin/no -o udp_recvspace=655360/usr/sbin/no -o tcp_sendspace=65536/usr/sbin/no -o tcp_recvspace=65536/usr/sbin/no -o rfc1323=1/usr/sbin/no -o sb_max=1500000/usr/sbin/no -o ipqmaxlen=512fi5.查看更改结果for i in ipqmaxlen rfc1323 sb_max tcp_recvspace tcp_sendspace udp_recvspace udp_sendspacedono -a |grep $idone十一、配置SSH可以忽略配置SSH,在安装grid及database时会自动安装配置(在AIX中最好提前配置,自动配置路径会出错)1.Grid用户以下两个节点都执行:#su – gridmkdir –p ~/.sshchmod 700 ~/.ssh/usr/bin/ssh-keygen -t rsa提示输入密码时,保持为空,直接回车即可。
ORACLE-11G-R2-搭建RAC集群硬件需求文档
(数据量10亿条,并发量1000个)
配置说明
1
Dell R610两台
2
每台DELL服务器上有两个双端口千兆网卡,一个SAS HBA卡
3
每台DELL服务器内存容量:16GB ECC DDR3
4
每台DELL服务器Xeon E5606 2.13GHz CPU数量:2颗*4核
5
存储设备:Dell MD3200一台,外接主机通道:SAS,单机磁盘数量:12个
进行恰当的RAID配置,平均传输率:6GB/s,硬盘转速:SAS硬盘15000rpm,近线SAS硬盘
6
操作系统版本:Red Hat Enterprise linux5.6
7
Oracle版本:Oracle 11g R2
网络设置说明
192.168.1.252
Openfile1192.168. Nhomakorabea.195
192.168.2.195
Oracle软件组件说明
软件组件
操作系统用户
主组
辅助组
主目录
Oracle基目录/Oracle主目录
Grid Infrastructure
grid
oinstall
asmadmin、asmdba、asmoper
/home/grid
/u01/app/grid
/u01/app/11.2.0/grid
Oracle RAC
oracle
oinstall
dba、oper、asmdba
/home/oracle
/u01/app/oracle
/u01/app/oracle/product/11.2.0/dbhome_1
11GR2单实例安装(ASM)
11GR2单实例安装(ASM)环境:OS: Red Hat Linux As5DB:11.2.0.1------------------------------------------Linux 安装11GR2软件部分--------------------------------------- 1.下载安装软件[root@hxl soft]# ls -1linux_11gR2_database_1of2.ziplinux_11gR2_database_2of2.ziplinux_11gR2_grid.zip2.解压压缩包[root@hxl soft]unzip linux_11gR2_database_1of2.zip[root@hxl soft]unzip linux_11gR2_database_2of2.zip[root@hxl soft]unzip linux_11gR2_grid.zip3.配置相应参数vi /etc/security/limits.conf添加如下内容:oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240vi /etc/sysctl.conf添加如下内容fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 4294967295kernel.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 = 1048576注意64bit的系统kernel.shmmax设置建议是物理内容的一半.参数设置完成后需要重系统,参数才能生效.4.创建oracle用户和dba,oinstall组[root@hxl soft]#groupadd oinstall[root@hxl soft]#groupadd dba[root@hxl soft]#mkdir -p /u01/export/home[root@hxl soft]#useradd -d /u01/export/home/oracle -g oinstall -G dba -s /bin/bash oracle -m [root@hxl soft]#chown oracle:dba /u01/export/home/oracle /u01[root@hxl soft]#passwd oracle5.使用oracle用户登录,设置环境变量export PS1='['`hostname`':$LOGIN:$PWD]$'export EDITOR=viexport ORACLE_SID=oraclexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export LD_LIBRARY_PA TH=$ORACLE_HOME/lib:/usr/libexport PA TH=$ORACLE_HOME/bin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/bin:/sbinexport NLS_DATE_FORMA T="YYYY-MM-DD HH24:MI:SS"6.创建环境变量中定义的目录[oracle@hxl /]$mkdir -p $ORACLE_BASE[oracle@hxl /]$mkdir -p $ORACLE_BASE/product/11.2.0/db_17.安装oracle软件(选择只安装软件)进入数据库软件目录[oracle@hxl database]$ ./runInstaller安装过程中将检查项需要安装的包都安装上,安装包在安装介质中可以找到.---------------------------------------------------安装ASMlib部分------------------------------------------ 1.查看系统内核[grid@hxl grid_soft]$ uname -r2.6.18-8.el52.按照如下顺序安装asmlib[root@hxl asmlib]# rpm -ivh oracleasm-support-2.1.7-1.el5.i386.rpm[root@hxl asmlib]# rpm -ivh oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm[root@hxl asmlib]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm3. 设置ASM驱动[root@hxl asmlib]# /etc/init.d/oracleasm configureConfiguring 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 <ENTER> without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: oinstallStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: yWriting Oracle ASM library driver configuration: doneInitializing the Oracle ASMLib driver: [ OK ]Scanning the system for Oracle ASMLib disks: [ OK ]4. 查看当前磁盘[root@hxl asmlib]# fdisk -lDisk /dev/sda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 201 2610 19358325 83 Linux/dev/sda2 1 200 1606468+ 82 Linux swap / Solaris Partition table entries are not in disk orderDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id SystemDisk /dev/sdc: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System5. 对sdb和sdc进行分区(具体步骤省略)[root@hxl dev]# fdisk /dev/sdb[root@hxl dev]# fdisk /dev/sdc分区后的结果如下:[root@hxl dev]# fdisk -lDisk /dev/sda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 201 2610 19358325 83 Linux/dev/sda2 1 200 1606468+ 82 Linux swap / Solaris Partition table entries are not in disk orderDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sdb1 1 1044 8385898+ 83 LinuxDisk /dev/sdc: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sdc1 1 1044 8385898+ 83 Linux6. 我们将分别在/dev/sdb1和/dev/sdc1上创建两个ASM磁盘[root@hxl dev]#/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1[root@hxl dev]#/etc/init.d/oracleasm createdisk VOL2 /dev/sdc17.查看ASM磁盘[root@hxl dev]# oracleasm listdisksVOL1VOL2----------------------------------------------安装GRID软件部分-------------------------------- 1.创建group查看当前的group[oracle@hxl 8670579]$ tail -10 /etc/groupslocate:x:21:gdm:x:42:distcache:x:94:apache:x:48:webalizer:x:67:squid:x:23:xfs:x:43:sabayon:x:86:oinstall:x:500:dba:x:501:oracle创建group[root@hxl ~]#groupadd -g 502 asmadmin[root@hxl ~]#groupadd -g 503 asmdba[root@hxl ~]#groupadd -g 504 asmoper2.创建grid用户[root@hxl ~]# useradd -d /u01/export/home/grid -g oinstall -G asmadmin,asmdba,asmoper grid -m[root@hxl ~]# passwd grid3.使用grid用户登录,添加环境变量,然后重新登录cd ~vi .bash_profileexport PS1=[`hostname`/`whoami`]$export EDITOR=viexport ORACLE_SID=+ASMexport ORACLE_BASE=/u01/gridexport ORACLE_HOME=/u01/gridsoftexport PA TH=$ORACLE_HOME/bin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/bin:/sbinexport NLS_DATE_FORMA T="YYYY-MM-DD HH24:MI:SS"4.创建环境中定义的目录[root@hxl ~]# mkdir -p /u01/grid[root@hxl ~]# mkdir -p /u01/gridsoft[root@hxl ~]# chown -R grid:oinstall /u01/grid[root@hxl ~]# chown -R grid:oinstall /u01/gridsoft5.修改相应参数vi /etc/security/limits.conf添加如下内容:grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 102406.安装grid[grid@hxl grid]$ ./runInstaller 选择单机安装选择语言创建磁盘组设置密码(密码必须包含大写字母和数字) 指定OS组安装前检查,将检查错误的每项进行修复指定安装目录在root用户执行提示的脚本点击finish进行安装----------------------------------------卸载GRID软件------------------------------------------------ 1.下载卸载包linux_11gR2_deinstall.zip2.解压缩unzip linux_11gR2_deinstall.zip3. 卸载grid./deinstall -home /u01/grid_soft。
Oracle 11gR2 RAC ASM Multipath ESXi Openfile
Oracle 11gR2 RAC ASM Multipath ESXiOpenfiler 1.介绍硬件配置:FUJITSU PRIMERGY RX300 S7 ,内存128G,硬盘2T虚拟机版本:VMware ESXi 5.5 update1Openfiler版本:2.99.1虚拟客户机:Oracle Linux 6 update 7Oracle数据库版本:11.2.0.4rac架构规划:安装VMware ESXi 5.5 update1 (略)安装Openfiler(略)Openfilter配置:https://10.10.10.200:446使用默认的用户名密码进行登陆User:openfilerPass:password安装Oracle Linux 6.7 (略)安装时选择“Desktop”模式,安装完成后关闭防火墙和selinux 安装必要的软件包:配置本地yum安装源:mount -o loop OracleLinux-R6-U7-Server-x86_64-dvd.iso /mediacd /etc/you.repos.dvilocal.repo[oel6]name=Enterprise Linux 6.7 DVDbaseurl=file:///media/Servergpgcheck=0enabled=1yum install oracle-rdbms-server-11gR2-preinstall安装Oracle:(以下操作在所有节点)cat /etc/sysctl.conf# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744fs.file-max = 6815744# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is '250 32000 100 128'kernel.sem = 250 32000 100 128# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is 4096kernel.shmmni = 4096# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4294967295 on i386 kernel.shmmax = 4398046511104# oracle-rdbms-server-11gR2-preinstall setting for kernel.panic_on_oops is 1 per Orabug 19212317kernel.panic_on_oops = 1# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_default is 262144net.core.rmem_default = 262144# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_max is 4194304net.core.rmem_max = 4194304# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_default is 262144net.core.wmem_default = 262144# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_max is 1048576net.core.wmem_max = 1048576# oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is 1048576fs.aio-max-nr = 1048576# oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500 net.ipv4.ip_local_port_range = 9000 65500cat /etc/security/limits.conf# oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024oracle soft nofile 1024# oracle-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536oracle hard nofile 65536# oracle-rdbms-server-11gR2-preinstall setting for nproc soft limit is 16384# refer orabug15971421 for more info.oracle soft nproc 16384# oracle-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384oracle hard nproc 16384# oracle-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KBoracle soft stack 10240# oracle-rdbms-server-11gR2-preinstall setting for stack hard limit is 32768KBoracle hard stack 32768# oracle-rdbms-server-11gR2-preinstall setting for memlock hard limit is maximum of {128GB (x86_64) / 3GB (x86) or 90 % of RAM}oracle hard memlock 134217728# oracle-rdbms-server-11gR2-preinstall setting for memlock soft limit is maximum of {128GB (x86_64) / 3GB (x86) or 90% of RAM}oracle soft memlock 134217728grid soft nofile 1024grid hard nofile 65536grid soft nproc 16384grid hard nproc 16384grid soft stack 10240grid hard stack 32768grid hard memlock 134217728grid soft memlock 134217728配置iSCSI(启动器)服务:serviceiscsi startserviceiscsid startchkconfigiscsi onchkconfigiscsid on[root@host1 rules.d]# iscsiadm -m discovery -t sendtargets -p 10.10.10.20010.10.10.200:3260,1 .openfiler:tsn.a5e4c27b1e4d10.10.10.201:3260,1 .openfiler:tsn.a5e4c27b1e4d10.10.10.200:3260,1 .openfiler:tsn.a55e30d0c0e910.10.10.201:3260,1 .openfiler:tsn.a55e30d0c0e9手工登录:iscsiadm -m node -T 10.10.10.200:3260,1 .openfiler:tsn.a5e4c27b1e4d –l -p 10.10.10.200iscsiadm -m node -T 10.10.10.201:3260,1 .openfiler:tsn.a5e4c27b1e4d –l -p 10.10.10.200iscsiadm -m node -T 10.10.10.200:3260,1 10.10.10.200:3260,1 .openfiler:tsn.a55e30d0c0e9 –l -p 10.10.10.200iscsiadm -m node -T 10.10.10.201:3260,1 10.10.10.200:3260,1 .openfiler:tsn.a55e30d0c0e9 –l -p 10.10.10.200Display current sessions# iscsiadm -m sessiontcp: [1] 10.10.10.200:3260,1 .openfiler:tsn.a5e4c27b1e4d (non-flash)tcp: [2] 10.10.10.201:3260,1 .openfiler:tsn.a5e4c27b1e4d (non-flash)tcp: [3] 10.10.10.200:3260,1 .openfiler:tsn.a55e30d0c0e9 (non-flash)tcp: [4] 10.10.10.201:3260,1 .openfiler:tsn.a55e30d0c0e9 (non-flash)安装multipath:yum install device-mapper-multipath配置multipath:cat /etc/multipath.confblacklist {devnode "^sda[1-2]"}defaults {user_friendly_names yespath_grouping_policymultibusfailback immediateno_path_retry fail}启动服务:servicemultipathd startcat/etc/udev/rules.d/12-dm-permissions.rulesENV{DM_NAME}=="mpathb", OWNER:="grid", GROUP:="asmadmin", MODE:="0660", SYMLINK+="oracleasm/disk-$env{DM_NAME}"Reload UDEV ( OEL 6 style )udevadm control --reload-rulesstart_udevcat /etc/hosts:10.10.10.11 host1 10.10.10.12 host2 10.10.10.21 host1-vip10.10.10.22 host2-vip10.10.10.31 host-cluster host-cluster-scan192.168.1.11 host1-priv192.168.1.12 host2-priv建用户:groupadd -g 5000 asmadmingroupadd -g 5001 asmdbagroupadd -g 5002 asmopergroupadd -g 6000 oinstallgroupadd -g 6001 dbagroupadd -g 6002 operuseradd -u 2000 -g oinstall -G asmadmin,asmdba,asmoper griduseradd -u 2001 -g oinstall -G dba,asmdba oracleoracle用户可能之前已经创建,这里命令会报错可使用usermod命令修改oracle用户所属组,否则后台使用DBCA创建库的时候会出错passwd gridpasswd oracle建目录:mkdir –p /oracle/grid_basemkdir –p /oracle/grid_homemkdir –p /oracle/app/product/11.2/db_1chown –R grid:asmadmin /oraclechown –R oracle:oinstall /oracle/app设置环境变量:grid 用户环境变量:export ORACLE_BASE=/oracle/grid_baseexport ORACLE_HOME=/oracle/grid_homeexport GRID_HOME=/oracle/grid_homeexport PATH=$GRID_HOME/bin:$GRID_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/binexport ORACLE_SID=+ASM1export LD_LIBRARY_PATH=$GRID_HOME/lib:$GRID_HOME/lib32export NLS_LANG=AMERICAN_AMERICA.ZHS16GBKoracle用户环境变量:export ORACLE_BASE=/oracle/appexport ORACLE_HOME=/oracle/app/product/11.2/db_1export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin export ORACLE_SID=rac1export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK安装Grid Infrastructure(使用grid用户):检查状态:[root@host1 ~]# crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER STATE_DETAILS --------------------------------------------------------------------------------Local Resources--------------------------------------------------------------------------------ora.DATA1.dgONLINE ONLINE host1ONLINE ONLINE host2ora.LISTENER.lsnrONLINE ONLINE host1ONLINE ONLINE host2ora.asmONLINE ONLINE host1 StartedONLINE ONLINE host2 Startedora.gsdOFFLINE OFFLINE host1OFFLINE OFFLINE host2workONLINE ONLINE host1ONLINE ONLINE host2ora.onsONLINE ONLINE host1ONLINE ONLINE host2--------------------------------------------------------------------------------Cluster Resources--------------------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr1 ONLINE ONLINE host1ora.cvu1 ONLINE ONLINE host1ora.host1.vip1 ONLINE ONLINE host1ora.host2.vip1 ONLINE ONLINE host2ora.oc4j1 ONLINE ONLINE host1ora.scan1.vip1 ONLINE ONLINE host1打补丁(GI):两节点都执行,使用grid用户cd/oracle/grid_home/crs/install[root@host1 install]# ./rootcrs.pl -unlockUsing configuration parameter file: ./crsconfig_paramsCRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'host1' CRS-2673: Attempting to stop 'ora.crsd' on 'host1'CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'host1'CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'host1'CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'host1'CRS-2673: Attempting to stop 'ora.oc4j' on 'host1'CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'host1'CRS-2677: Stop of 'ora.cvu' on 'host1' succeededCRS-2672: Attempting to start 'ora.cvu' on 'host2'CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'host1' succeededCRS-2673: Attempting to stop 'ora.scan1.vip' on 'host1'CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'host1' succeededCRS-2673: Attempting to stop 'ora.host1.vip' on 'host1'CRS-2676: Start of 'ora.cvu' on 'host2' succeededCRS-2677: Stop of 'ora.scan1.vip' on 'host1' succeededCRS-2672: Attempting to start 'ora.scan1.vip' on 'host2'CRS-2677: Stop of 'ora.host1.vip' on 'host1' succeededCRS-2672: Attempting to start 'ora.host1.vip' on 'host2'CRS-2676: Start of 'ora.scan1.vip' on 'host2' succeededCRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'host2'CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'host2' succeededCRS-2677: Stop of 'ora.oc4j' on 'host1' succeededCRS-2672: Attempting to start 'ora.oc4j' on 'host2'CRS-2676: Start of 'ora.host1.vip' on 'host2' succeededCRS-2677: Stop of 'ora.DATA1.dg' on 'host1' succeededCRS-2673: Attempting to stop 'ora.asm' on 'host1'CRS-2677: Stop of 'ora.asm' on 'host1' succeededCRS-2676: Start of 'ora.oc4j' on 'host2' succeededCRS-2673: Attempting to stop 'ora.ons' on 'host1'CRS-2677: Stop of 'ora.ons' on 'host1' succeededCRS-2673: Attempting to stop 'work' on 'host1'CRS-2677: Stop of 'work' on 'host1' succeededCRS-2792: Shutdown of Cluster Ready Services-managed resources on 'host1' has completed CRS-2677: Stop of 'ora.crsd' on 'host1' succeededCRS-2673: Attempting to stop 'ora.ctssd' on 'host1'CRS-2673: Attempting to stop 'ora.evmd' on 'host1'CRS-2673: Attempting to stop 'ora.asm' on 'host1'CRS-2673: Attempting to stop 'ora.mdnsd' on 'host1'CRS-2677: Stop of 'ora.evmd' on 'host1' succeededCRS-2677: Stop of 'ora.mdnsd' on 'host1' succeededCRS-2677: Stop of 'ora.asm' on 'host1' succeededCRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'host1'CRS-2677: Stop of 'ora.ctssd' on 'host1' succeededCRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'host1' succeededCRS-2673: Attempting to stop 'ora.cssd' on 'host1'CRS-2677: Stop of 'ora.cssd' on 'host1' succeededCRS-2673: Attempting to stop 'ora.crf' on 'host1'CRS-2677: Stop of 'ora.crf' on 'host1' succeededCRS-2677: Stop of 'ora.gipcd' on 'host1' succeededCRS-2673: Attempting to stop 'ora.gpnpd' on 'host1'CRS-2677: Stop of 'ora.gpnpd' on 'host1' succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'host1' has completedCRS-4133: Oracle High Availability Services has been stopped.Successfully unlock /oracle/grid_home更新OPatch软件:cd /oracle/grid_homerm -rfOPatch/unzip p6880880_112000_Linux-x86-64.zipcd /oracle/soft/gridunzip p2*******_112040_Linux-x86-64.zipcd/oracle/grid_home/OPatch/./opatchnapply -oh /oracle/grid_home -local /oracle/soft/grid/20996923./opatchlspatches./opatchlsinventory打补丁(DB):两个节点都执行,使用oracle用户cd /oracle/app/product/11.2/db_1/rm -rfOPatch/unzip p6880880_112000_Linux-x86-64.zipcd/oracle/soft/db/unzip p2*******_112040_Linux-x86-64.zipcd /oracle/app/product/11.2/db_1/OPatch./opatchnapply -oh /oracle/app/product/11.2/db_1 -local /oracle/soft/db/20760982./opatchlspatches./opatchlsinventory在root用户下开启crs服务:/oracle/grid_home/rdbms/install/rootadd_rdbms.sh/oracle/grid_home /crs/install/rootcrs.pl -patch系统检查:crsctl check hascrsctl check crscrsctl stat res -t ifconfig–a创建数据库DBCA:调整VKTM优先级:参考文档:百度文库:Oracle 11gR2 RAC ESXiOpenfiler/link?url=zhS05_Rf3zH0CQF-RFpIwOr8S2-q2qw8IHFLDlz9e6UusN-WFN0L vHW9Tm0tRR-MCFuiajwOQaZimYyZpXUJ5zX2Hf45K_V2uTC2qh4wlXSOracle RAC安装中使用multipath实现存储设备持久化/s/blog_48567d850101jxmj.htmlLinux平台的多路径软件multipath的使用案例/23135684/viewspace-745789/Oracle 11g R2+RAC+ASM+OracleLinux6.4安装详解(图)/xmlrpc.php?r=blog/article&id=4681351&uid=29655480在Oracle Enterprise Linux 和iSCSI 上构建您自己的Oracle RAC 11g 集群/technetwork/cn/articles/hunter-rac11gr2-iscsi-083834-zhs.htmlRAC 11.2.0.4 setup using OPENFILER with Multipath ISCSI diskshttp://www.hhutzler.de/blog/rac-11-2-0-4-setup-using-openfiler-with-multipathed-iscsi-disks/#s etup-iscsi-clients-rac-nodesUDEV setup in a Multipath env for RAC/ASMhttp://www.hhutzler.de/blog/udev-setup-for-a-multipath-env/。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Suse11SP1_ Oracle11R2安装ASM+RAC配置步骤1运行环境1.1硬件环境IBM 3755 AMD Processr 8380 2.5GHz*16 8G 双网卡IBM X366 Xeon CPU 3.00GHz*8 8G 双网卡IBM FAS600阵列146.8*13 双HBA卡组网方式:1.2软件环境操作系统:Suse11SP1 x86_64 内核:2.6.32.12-0.7-default数据库版本:Oracle Database Enterprise Edition 11.2.0.1 for Linux x86_64集群软件版本:Oracle Grid 11.2.0.1 for Linux x86_64注意:1.ORACLE 11G只能安装在SLES 10以上的版本中。
2.ORACLE集群软件的版本不能低于ORACLE数据库的版本,不推荐使用其它第三方集群软件,如VCS做ORACLE数据库的集群。
11G的集群软件不能管理9i的数据库3.推荐安装64位数据库,这样可以使用大内存(SGA),显著提高性能4.11g后可考虑使用ORACLE ASM代替LINUX LVM管理存储,它是一个单独的数据库实例,一个操作系统只能有一个。
2环境检查2.1检查硬件环境检查内存:内存>=1G,# grep MemTotal /proc/meminfo检查swap:交换空间swap为8G(内存为1~2G时,swap为起1.5倍,如果大于2G,swap等于内存大小# grep SwapTotal /proc/meminfo检查/tmp:/tmp> 500M 最好不少于1G# df -k /tmp检查/home:/home> 500M 最好不少于1G# df -k /home检查系统空间:系统磁盘空间还有不少于6G空间,# df –h安装中不使用防火墙和selinux私有网卡不可以用反线连接2.2检查软件环境对于Suse linux要求内核至少为2.6.16.21# rpm -q package_name删除多余的软件包(如果不把它们删除,将严重干扰后续ORACLE的安装和配置)# rpm -qa ora*orarun-1.9-21.15# rpm -qa sap*sapinit-2.0.1-1.10# rpm -e orarun-1.9-21.15# rpm -e sapinit-2.0.1-1.10# rm –i /etc/oraInst.loc对于Suse linux要求至少具备以下安装包,版本不低于以下各包:binutils-2.17.50.0.6compat-libstdc++-33-3.2.3compat-libstdc++-33-3.2.3(32 位)elfutils-libelf-0.125elfutils-libelf-devel-0.125elfutils-libelf-devel-static-0.125gcc-4.1.2gcc-c++-4.1.2glibc-2.5-24glibc-2.5-24(32 位)glibc-common-2.5glibc-devel-2.5glibc-devel-2.5(32 位)glibc-headers-2.5libaio-0.3.106libaio-0.3.106(32 位)libaio-devel-0.3.106libaio-devel-0.3.106(32 位)libgcc-4.1.2libgcc-4.1.2(32 位)libstdc++-4.1.2libstdc++-4.1.2(32 位)libstdc++-devel 4.1.2make-3.81sysstat-7.0.2unixODBC-2.2.11unixODBC-2.2.11(32 位)unixODBC-devel-2.2.11unixODBC-devel-2.2.11(32 位)以下三个包需要从官网下载,是必须安装的oracleasm-2.6.16.60-0.21-bigsmp-2.0.4-1.SLE10.i586.rpm oracleasm-support-2.1.3-1.SLE10.i386.rpm oracleasmlib-2.0.4-1.SLE10.i386.rpm3安装前准备工作3.1准备安装包:oracle官网上有下载linux.x64_11gR2_grid.ziplinux.x64_11gR2_database_1of2.ziplinux.x64_11gR2_database_2of2.zip3.2磁盘规划磁盘的划分后,两节点都能看到,能正确读写。
在其中一节点上运行fdisk划分以下分区/dev/sdb1 200G 存放数据/dev/sdb2 200G 存放数据/dev/sdd1 1G存放CRS/dev/sdd2 1G存放CRS/dev/sdd3 1G存放CRS/dev/sdd5 50G存放recover/dev/sdd6 50G存放flash然后在另一节点上执行partprobe检测分区是否创建成功:在两节点上都要检查ls /dev/sdh*/dev/sdh /dev/sdh1 /dev/sdh2 /dev/sdh3使用dd命令检测新分区是否能够读写dd if=/dev/zero of=/dev/sdb1 bs=1M count=103.3配置网络两节点eth0和eth0(eth1和eth1)要一一对应在同一网段下,一个主机名对一个IP,私网IP与公网IP要在不同网段下,VIP要与公网IP是同网段。
本次分配如下:cat /etc/hosts (两节点)127.0.0.1 loopback localhost # loopback (lo0) name/address10.249.240.143 s-zh-ora01 #ETH0 掩码255.255.255.128 网关10.249.240.25410.249.240.158 s-zh-ora01-vip #掩码255.255.255.128 网关10.249.240.25410.249.240.71 s-zh-ora01-priv #ETH1掩码255.255.255.192 网关10.249.240.12610.249.240.144 s-zh-ora02 #ETH010.249.240.159 s-zh-ora02-vip10.249.240.72 s-zh-ora02-priv #ETH1,用于心跳10.249.240.160 rac-scan #用于clurswere scan分配静态IPvi /etc/sysconfig/network/ifcfg-ethXBOOTPROTO='static'BROADCAST=''ETHTOOL_OPTIONS=''IPADDR='10.249.240.143/25'MTU=''NAME='NetXtreme II BCM5708 Gigabit Ethernet'NETWORK=''REMOTE_IPADDR=''STARTMODE='auto'USERCONTROL='no'PREFIXLEN='24'注意重启网络后要在两边都验证一下,此时vip是ping不通的ping s-zh-ora01ping s-zh-ora01-privping s-zh-ora02ping s-zh-ora02-priv3.4配置时间同步服务安装Oracle11R2的RAC,只要关闭ntp服务即可。
chkconfig ntp offservice ntp stopmv /etc/ntp.conf /etc/ntp.oraOracle11R2前的版本配置NTP服务参考如下:服务器端配置vi /etc/ntp.confserver 10.249.254.46再重启NTP服务service ntp restartchkconfig ntpd on客户端配置crontab -e*/15 * * * * /usr/sbin/ntpdate -s 10.249.254.46 && /sbin/hwclock -w及chkconfig ntp offservice ntp stop3.5配置SSH互信访问安装Oracle11R2的RAC不需要配置SSH互信,但是要开启SSH服务,如果没有SSH,可选RSH/RLOGIN。
service sshd startchkconfig –level 345 sshd onOracle11R2前的版本可参考如下:在两节点上都进行如下操作su – oraclessh-keygen -t rsa在~/.ssh/目录生成了文件id_rsa.pubssh-keygen -t dsa在~/.ssh/生成了文件id_dsa.pubcat id_rsa.pub >>authorized_keys最后将两个节点该文件authorized_keys的内容复制到对方的同文件里在两节点都要测试验证以下命令,要求不输入密码则通过:ssh s-zh-ora01ssh s-zh-ora01-privssh s-zh-ora02ssh s-zh-ora02-priv3.6修改内核参数与限制3.6.1在/etc/sysctl.conf中添加,生效命令:sysctl -pnet.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.inotify.max_user_watches = 65536net.ipv4.conf.default.promote_secondaries = 1net.ipv4.conf.all.promote_secondaries = 1vm.max_map_count = 1000000kernel.shmall = 5242880kernel.shmmax = 21474836480kernel.shmmni = 4096kernel.sem = 1250 256000 100 8192fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 10485763.6.2ORACLE用户的最大进程数和打开文件数的限制在/etc/security/limits.conf中添加:grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 655363.6.3在/etc/pam.d/login中添加:session required pam_limits.so3.6.4配置hangcheck-timer 内核模块echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modprobe.confmodprobe hangcheck-timergrep Hangcheck /var/log/messages | tail -23.7配置图形化界面方法有很多,常用有VNC,Xmanager,KVM等,在此不详叙。