Oracle 11g RAC部署

安装前规划

硬件环境
服务器:两台 IBM X3850(32G/2*300G)

存储:IBM V7000

服务器和存储通过FC连接

软件环境
数据库:

p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
集群软件
p13390677_112040_Linux-x86-64_3of7.zip

操作系统

RedHat 6.3

注:==swap分区设置至少4G==

 

  • 用户组和文件系统配置
软件组件 用户 主组 辅助组 ORACLE_BASE ORACLE_HOME
grid Infra grid oinstall asmadmin asmdba asmoper dba /oracle/app/grid /oracle/app/11.2/grid
oracle oracle oinstall dba asmadmin asmdba oper /oracle/app/oracle $ORACLE_BASE/product/11.2.0/dbhome_1
  • 网络规划
名称 对应网卡 IP 用户
jcptdba eth0 172.168.4.71 Public
jcptdba-vip 172.168.4.73 VIP
jcptdba-priv eth1 192.168.4.71 Private
jcptdbb eth0 172.168.4.72 Pbulic
jcptdbb-vip 172.168.4.74 VIP
jcptdbb-priv eth1 192.168.4.72 Private
SCAN IP 172.168.4.75

注意:public、vip、scan-ip均应该在一个网段且与private不能在同一个网段。Scan-ip是11g的新特性,在服务端添加或减少节点时客户端不需要任何改变。

存储规划

ASM规划

磁盘组名 PV 属主 权限 单个LUN大小 冗余 总容量
OCR Hdisk1 Hdisk2 Hdisk3 Grid:asmadmin 660 2G 2G 2G Normal 2G
DATA Hdisk4 Hdisk5 Hdisk6 Grid:asmadmin 660 800G 800G External 1.6T
FRA Hdisk7 Hdisk8 Grid:asmadmin 660 200G External 200G

OCR磁盘组:保存CRS信息及Voting disk等信息

DATA磁盘组:保存数据文件、控制文件

ARCH磁盘组:保存节点的归档文件

REDO磁盘组:保存online redolog file,强烈推荐使用raid 10 ,因为raid 5会影响redolog file切换速度

安装前系统准备

系统硬件环境检查
环境检测

[root@rac2 ~]# cat /etc/redhat-release #操作系统版本
[root@rac2 ~]# cat /proc/meminfo | grep MemTotal #内存大小
[root@rac2 ~]# cat /proc/meminfo | grep SwapTotal #SWAP空间
[root@rac2 ~]# df -h #文件系统
[root@rac2 ~]# getconf PAGE_SIZE #系统结构
[root@rac2 ~]# cat /proc/cpuinfo |grep “physical id”|sort |uniq|wc -l #物理CPU个数
[root@rac2 ~]# cat /proc/cpuinfo |grep “processor”|wc -l #逻辑CPU个数
[root@rac2 ~]# cat /proc/cpuinfo |grep “cores”|uniq #CPU核数
系统软件包

RedHat 6 operating system filesets are required
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
验证系统是否安装完全(redhat 6为例)

[root@rac2 ~]# for i in binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat unixODBC-devel unixODBC
do
rpm -q $i &>/dev/null || F=”$F $i”
done ;echo $F;unset F
yum批量安装所需软件包

一般实际现场环境都没有互联网,所以可以利用系统安装光盘,配置本地yum源,进行安装包安装:

#mount /dev/cdrom /media/cdrom
#cd /etc/yum..repos.d
#vi local.repo
[local_server](库名称)
name=Thisis a local repo (名称描述)
baseurl=file:///media/dvd(yum源目录,源地址)
enabled=1(是否启用该yum源,0为禁用)
gpgcheck=0 (检查GPG-KEY,0为不检查,1为检查)
接下来就可以安装软件包了

[root@rac2 ~]# yum install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat unixODBC-devel unixODBC
或者创建安装脚本一键安装,脚本内容为:

#!/bin/bash
#installing rpm packages
for install in binutils* compat* gcc* glibc* ksh* libgcc* libstdc* libaio* make* sysstat* kernel* elfutils* gnome-utils* pdksh* setarch* numactl* unixODBC* libXp* control-center*
do
yum -y install $install
done
配置网络
双网卡绑定

首先校验系统是否支持bonding

[root@rac1 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m
[root@rac1 ~]# cat /boot/config-2.6.32-279.el6.x86_64 | grep -i bonding
CONFIG_BONDING=m
#CONFIG_BONDING=m 表示支持bonding
备份并修改网卡配置,新建虚拟网卡配置文件:/etc/sysconfig/network-scripts/ifcfg-bond0

cp ifcfg-eth0 ifcfg-eth0.bak
vi ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.168.4.71
NETMASK=255.255.255.192
GATEWAY=172.168.4.1
USERCTL=no
更改/etc/sysconfig/network-scripts/ifcfg-eth0网卡属性

DEVICE=”eth0″
BOOTPROTO=”none”
ONBOOT=”yes”
MASTER=bond0
SLAVE=yes
HWADDR=”08:00:27:94:5F:72″
更改/etc/sysconfig/network-scripts/ifcfg-eth1网卡属性

DEVICE=”eth1″
BOOTPROTO=”none”
ONBOOT=”yes”
MASTER=bond0
SLAVE=yes
HWADDR=”08:00:27:CE:CE:FA”
配置绑定模型

vi /etc/modprobe.d/dist.conf 尾部添加
alias bond0 bonding
options bond0 mode=1 miimon=100#
#mode=1主备模式,mode=0负载均衡模式需要交换机支持
配置网卡启动顺序

vi /etc/rc.d/rc.local
ifenslave bond0 eth0 eth1
touch /var/lock/subsys/local
关闭NetworkManager服务

service NetworkManager stop
chkconfig NetworkManager off
重启网卡,重启服务器,查看接口配置网卡的MAC地址是否与bond的一致,一致则成功

修改所有节点的/etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# Public Network #
172.168.73.19 jcptdba
172.168.73.20 jcptdbb
# Private Interconnect #
192.168.73.19 jcptdba-priv
192.168.73.20 jcptdbb-priv
# Public Virtual IP (VIP) addresses #
172.168.73.21 jcptdba-vip
172.168.73.22 jcptdbb-vip
# SCAN IP #
172.168.73.23 scan-jcptdb
注意,名字最好小写,安装grid时候输入节点一定要用小写,否则bug不能通过口令认证。
Linux系统参数优化vi /etc/sysctl.conf

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
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 = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
注:sysctl -p 执行后立即生效
用户使用系统资源限制 vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
用户shell限制 vi c

if [ $USER = “oracle” ] || [ $USER = “grid” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
vi /etc/pam.d/login

session required /lib64/security/pam_limits.so
创建用户和组
vi /etc/oraInst.loc
inventory_loc=/oracle/app/oraInventory
inst_group=oinstall

/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper
/usr/sbin/useradd -u 601 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
/usr/sbin/useradd -u 602 -g oinstall -G dba,asmdba,oper oracle
[root@rac1 ~]# id grid
uid=601(grid) gid=501(oinstall) groups=501(oinstall),502(dba),504(asmadmin),506(asmdba),507(asmoper)
[root@rac1 ~]# id oracle
uid=602(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba),503(oper)
passwd grid oracle
passwd oracle oracle
用户环境变量.bash_profile

==–grid==

ORACLE_SID=+ASM1; export ORACLE_SID #SID按具体情况填写
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/app/11.2.0/grid; export ORACLE_HOME
ORACLE_PATH=/oracle/app/oracle/common/oracle/sql; export ORACLE_PATH
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK ; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/oracle/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
==–oracle==

ORACLE_SID=rac1; export ORACLE_SID #SID按具体情况填写
ORACLE_UNQNAME=rac; export ORACLE_UNQNAME
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_PATH=/oracle/app/common/oracle/sql; export ORACLE_PATH
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK ; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/oracle/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
创建安装目录

mkdir -p /oracle/app/11.2.0/grid
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/oracle
chown grid:oinstall /oracle/app/11.2.0/grid
chown grid:oinstall /oracle/app/grid
chmod -R 775 /oracle/
chown -R grid:oinstall /oracle
chown oracle:oinstall /oracle/app/oracle
配置SSH用户互信

su – grid
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa #双节点执行
/usr/bin/ssh-keygen -t dsa #双节点执行
单节点执行
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh ImageDB2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh ImageDB2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys ImageDB2:.ssh/authorized_keys

su – oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa #双节点执行
/usr/bin/ssh-keygen -t dsa #双节点执行
单节点执行
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh ImageDB2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh ImageDB2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys ImageDB2:.ssh/authorized_keys

双节点验证方法:
ssh imagedb1 date
ssh imagedb2 date
ssh imagedb1-priv date
ssh imagedb2-priv date
磁盘配置
确保安装以下的包

device-mapper
device-mapper-multipath
[root@nticket1~]# rpm -qa “*device*”
device-mapper-multipath-0.4.9-56.0.3.el5
device-mapper-multipath-libs-0.4.9-56.0.3.el5
device-mapper-1.02.67-2.el5
device-mapper-event-1.02.67-2.el5
device-mapper-1.02.67-2.el5
编辑配置文件/etc/multipath.conf

要创建一个multipath.conf的配置文件,该文件在安装后不会自动创建。可以使用一个模板创建一个multipath.conf的文件。

[root@nticket1 ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.synthetic /etc/multipath.conf
编辑黑名单

默认情况下,multipath会把所有设备都加入到黑名单(devnode “*”),也就是禁止使用。所以,我们首先需要取消该设置,把配置文件修改为类似下面的内容:

devnode_blacklist {
#devnode “*”
devnode “hda”
wwid 3600508e000000000dc7200032e08af0b
}
这里禁止使用hda,也就是光驱。另外,还限制使用本地的sda设备,这个wwid,可通过下面的命令获得:

# scsi_id -g -u -s /block/sda
3600508e000000000dc7200032e08af0b
multipath.conf配置示例

##
##This is a template multipath-tools configuration file
## Uncomment the lines relevent to your environment
##
defaults {
user_friendly_names yes
}
blacklist {
wwid 3600605b00b9fa7501ef46b681027a497 (这是本机的硬盘wwid)
}
multipaths {
multipath {
wwid 3600507680c800312e000000000000022
alias asmocr3
path_grouping_policy failover
path_selector “round-robin 0”
failback manual
rr_weight priorities
no_path_retry 5
rr_min_io 1
}
multipath {
wwid 3600507680c800312e000000000000021
alias asmocr2
path_grouping_policy failover
path_selector “round-robin 0”
failback manual
rr_weight priorities
no_path_retry 5
rr_min_io 1
}
multipath {
wwid 3600507680c800312e000000000000020
alias asmocr1
path_grouping_policy failover
path_selector “round-robin 0”
failback manual
rr_weight priorities
no_path_retry 5
rr_min_io 1
}
multipath {
wwid 3600507680c800312e000000000000024
alias asmdata2
path_grouping_policy failover
path_selector “round-robin 0”
failback manual
rr_weight priorities
no_path_retry 5
rr_min_io 1
}
multipath {
wwid 3600507680c800312e000000000000023
alias asmdata1
path_grouping_policy failover
path_selector “round-robin 0”
failback manual
rr_weight priorities
no_path_retry 5
rr_min_io 1
}
}
启动服务生成映射

# modprobe dm-multipath
# service multipathd start
# multipath -v0
# chkconfig –level 345 multipathd on
# chkconfig –list | grep multipathd
multipathd 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭
# multipath -v3 //装配多路径设备
查看复合后的设备

[root@nticket1~]# multipath -ll //显示当前多路径拓扑结构
Dec 20 16:31:21| multipath.conf line 73, invalid keyword: {
mpath2 (360022a11000659d858abb41000000001)dm-1 HUAWEI,S2300E
size=200G features=’0′ hwhandler=’0′ wp=rw
|-+-policy=’round-robin 0′ prio=1 status=active
| `- 1:0:0:1 sdc8:32 active ready running
|-+-policy=’round-robin 0′ prio=1 status=enabled
| `- 1:0:1:1 sde8:64 active ready running
|-+-policy=’round-robin 0′ prio=1 status=enabled
| `- 2:0:0:1 sdg8:96 active ready running
`-+-policy=’round-robin 0′ prio=1 status=enabled
`- 2:0:1:1 sdi 8:128 active ready running

mpath1 (360022a11000659d858abb3f200000000) dm-0 HUAWEI,S2300E
size=200G features=’0′ hwhandler=’0′ wp=rw
|-+-policy=’round-robin 0′ prio=1 status=active
| `- 1:0:0:0 sdb8:16 active ready running
|-+-policy=’round-robin 0′ prio=1 status=enabled
| `- 1:0:1:0 sdd8:48 active ready running
|-+- policy=’round-robin0′ prio=1 status=enabled
| `- 2:0:0:0 sdf8:80 active ready running
`-+-policy=’round-robin 0′ prio=1 status=enabled
`- 2:0:1:0 sdh 8:112 active ready running
以上的结果可以看出,每个磁盘设备对应的是4条链路。每个设备都有两个multipath设备名,分别是mpath[x]和dm-[x],mpath位于/dev/mpath目录下,dm-[x]位于/dev目录下。
状态正常的话,把multipathd设置为自启动:
# chkconfig multipathd on
通过/var/lib/multipath/bindings可以获取所有磁盘的wwid,确定每个磁盘的别名之后,在/etc/multipath.conf中的multipaths段中加入相应的配置

[root@nticket1 dev]# ls dm*
dm-0 dm-1
[root@nticket1 mpath]# ll
总计 0
lrwxrwxrwx 1 root root 7 12-20 15:01 360022a11000659d858abb3f200000000 -> ../dm-0
lrwxrwxrwx 1 root root 7 12-20 15:01 360022a11000659d858abb41000000001 -> ../dm-1
配置正确的话就会在/dev/mapper/目录下多出mpath1、mpath2等之类设备
[root@nticket1 ~]# cd /dev/mapper/
[root@nticket1 mapper]# ll
总计 0
crw——- 1 root root 10, 236 12-2010:32 control
brw-rw—- 1 root disk 252, 0 12-2015:01 mpath1
brw-rw—- 1 root disk 252, 1 12-2015:01 mpath2
使用mpath设备
用multipath生成映射后,会在/dev目录下产生多个指向同一条链路的设备:
/dev/mapper/mpathn 是multipath虚拟出来的多路径设备,我们应该使用这个设备;
/dev/mpath/mpathn 是udev设备管理器创建的,实际上就是指向下面的dm-n设备,仅为了方便,不能用来挂载;
/dev/dm-n 是软件内部自身使用的,不能被软件以外使用,不可挂载。
分区或创建lvm

用fdisk分区并保存后,必须刷新multipath的映射表,以便其创建分区对应的设备符,例如:

# fdisk -l /dev/mapper/mpath0
Disk /dev/mapper/mpath0: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/mapper/mpath0p1 1 26108 209712478+ 83 Linux
# multipath -F
# multipath -v0
# ll /dev/mapper/mpath0p1
brw-rw—- 1 root disk 253, 2 5月 7 07:40 /dev/mapper/mpath0p1
同样的,mpathn或其分区都可用来做pv使用:
# pvcreate /dev/mapper/mpath0p1
# vgcreate test /dev/mapper/mpath0p1
# lvcreate -L 1g -n lv1 test
# lvdisplay
# mkfs.ext3 /dev/test/lv1
根据网上的资料,有部分multipath版本存在与lvm兼容的问题。具体表现是,使用device-mapper设备创建lvm完成,重启后,虽然lvm仍存在,但/dev/mapper下的设备丢失。为了防止可能的意外,建议还是修改一下lvm的配置文件/etc/lvm/lvm.conf,加入:

types=[“device-mapper”, 1]
配置NTP服务

[root@rac1 ~]# crontab –l
* * * * * /usr/sbin/ntpdate 10.124.82.3
Grid安装
检测环境

# rpm -iv cvuqdisk-1.0.9-1.rpm root用户执行
su – grid
$./runcluvfy.sh stage -pre crsinst -n jcptdba, jcptdbb -fixup -verbose > /home/grid/cvu.log
CVU是Cluster Verify Utility的缩写。为了避免Grid Infrastructure安装过程中的错误,Oracle 提供了一个校验工具,即CVU。该工具的主要功能是检查系统的硬件和软件环境是否满足安装的要求。
CVU工具包括两个脚本:runcluvfy.sh和cluvfy 。runcluvfy.sh脚本位于Grid Infrastructure的安装介质中,它的功能是在安装Grid Infrastructure之前对系统进行校验。而cluvfy位于Grid Infrastructure软件的HOME目录下的bin目录中,它的功能是在安装Oracle 数据库软件或者创建集群数据库之前,对系统进行校验。

脚本的常见使用形式
./runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose
./runcluvfy.sh stage -pre crsinst -n node1,node2 -fixup -verbose

语法说明:
-pre: 该选项主要检查是否满足安装的需要。
-post:该选择主要检查安装后组件是否正常。
-n:该选项用于指定节点列表。
-verbose:该选项用于输出详细的验证信息。
-fixup:这是Oracle 11gR2中新增加的一个参数。利用这个参数,可以产生一个名为runfixup.sh的脚本。

runfixup.sh脚本中包含一系列的操作系统命令,利用这个脚本可以对操作系统进行一定的修改,使其满足安装条件。完成系统进行校验之后,以root用户的身份执行脚本runfixup.sh,就可以解决操作系统中一些尚不满足安装条件的情况。
安装grid

root用户执行xhost +
$ export DISPLAY=10.124.88.176:0.0
如果显示有问题,那么export LANG=en_us
$./runInstaller (grid用户安装)
Setup 1:
Install and Configure Grid infrastructure for a cluster
Setup 2:
Advanced installation
Setup 3:
Selected Languages – English
Setup 4:
Cluster Name : scan-cap
SCAN Name: scan-cap
SCAN Port: 1521
Setup 5:
Hostname: cap1,cap2
Virtual ip name: cap1-vip,cap2-vip
–ssh connectivity
Setup 6:
Subnet: 10.124.84.0 public ,10.10.10.0 private
Setup 7:
Automatic Storage Management(ASM)
Setup 8:
Disk Group Name: OCR
Redundancy:Normal
Candidate Disks:/dev/rhdisk1、/dev/rhdisk2、/dev/rhdisk3
Setup 9:
Use same passwords for these accounts
Specify password:oracle confirm password:oracle
Setup 10:
OSDBA-oinstall
OSOPER-asmoper
OSASM-asmadmin
Setup 11:
Oracle Base: /oracle/rac/grid
Software location:/oracle/rac/11.2
Setup 12:
Inventory Directory:/oracle/rac/oraInventory
Setup 13:
Perform prerequisite checks
可以适当的忽悠报警
Setup 14:
Summary
Setup 15:
Setup 等待安装
Setup 16:
rm -rf /tmp/.oracle
root用户执行提示脚本
setup 17:
close
检验GRID是否运行
# crsctl stat res
安装oracle
Setup 1:
I wish to receive security updates via My Oracle Support
Setup 2:
Install database software only
Setup 3:
Real Application Clusters database installation
–add node name cap1 and cap2
–ssh connectivity OS username oracle and password
Setup 4:
Selected Languages:English
Setup 5:
Enterprise Edition
Setup 6:
Oracle Base: /oracle/rac/oracle
Software location: /oracle/rac/oracle/product/11.2/dbhome_1
Setup 7:
OSDBA-dba
OSOPER-oinstall
Setup 8:
Perform Prerequisite Checks
可适当忽略报警
Setup 9:
Summary
Setup 10:
Root用户执行提示脚本
Setup 11:
Close
创建磁盘组
su – grid
asmca
+DATA
+ARCH
创建数据库
su – oracle
./dbca

Setup 1:
Oracel Real Application Cluster database
Setup 2:
Create a Database
Setup 2:
Create a Database
Setup 3:
General Purpose or Transaction Processing
Setup 4:
Configuration type: admin-managed
Global Database Name:raccap
SID Prefix:raccap
Select All
Setup 5:
Enterprise Manager: Configure Enterprise Manager
Setup 6:
Use the same administrative password for all accounts
Password:oracle
Confirm password:oracle
Setup 7:
Use Oracle-Managed Files
Database Area:+DATA
Setup 8:
Specify ASMSNMP password specific to ASM:oracle
Setup 9:
NO FRA
Setup 10:
Sample Schema
Setup 11:
Memory: Use automatic memory management
Character Sets:选择你所需的字符集
Setup 12:
Summary
Setup 13:
Create Database
Setup 14:
Setup 等待安装中
Setup 15:
Exit
[grid@jcptdba ~]$ crs_stat -t #查看进程

共有 0 条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注