Oracle Enterprise Linux6.4安装Oracle Database12c RAC图文详细教程
(附Oracle简单使用体验)
By Luocs.Xu
Blog:https://www.doczj.com/doc/366322618.html,
2013年07月01日
目录
1.环境介绍 (3)
2.所需介质 (3)
3.操作系统信息 (3)
3.1RAC节点服务器 (3)
3.2DNS服务器 (6)
3.3SAN服务器 (7)
4.正式部署安装 (7)
4.1配置DNS服务 (7)
4.1.1安装bind三个包 (7)
4.1.2配置主区域 (7)
4.1.3给两个节点配置DNS (9)
4.1.4测试 (9)
4.2配置/etc/hosts (10)
4.3系统配置 (11)
4.3.1修改/etc/sysctl.conf (11)
4.3.2生效 (11)
4.3.3修改/etc/security/limits.conf (11)
4.4配置YUM源并安装所需包 (11)
4.4.1配置YUM源 (11)
4.4.2将光驱挂载上 (12)
4.4.3安装所需包 (12)
4.5创建用户和组 (12)
4.5.1创建组 (12)
4.5.2创建用户 (12)
4.5.3设置口令 (12)
4.6创建安装目录以及授权 (12)
4.7配置境变量 (12)
4.8Iscsi挂载磁盘并配置UDEV (14)
4.9禁用NTP服务 (16)
4.10解压介质 (16)
4.11校验 (17)
4.12安装 (18)
4.12.1安装GI (18)
4.12.2创建ASM磁盘组 (32)
4.12.3安装RDBMS软件 (34)
4.12.4创建数据库 (40)
5.最终结果 (50)
1.环境介绍
OS:Oracle Enterprise Linux6.4(For RAC Nodes),Oracle Enterprise Linux5.8(For DNS Server),Openfiler
2.3(For SAN Storage)
DB:GI and Database12.1.0.1
2.所需介质
linuxamd64_12c_database_1of2.zip
linuxamd64_12c_database_2of2.zip
linuxamd64_12c_grid_1of2.zip
linuxamd64_12c_grid_2of2.zip
--这里只给出Oracle相关的,操作系统以及其他软件请自身准备。
3.操作系统信息
3.1RAC节点服务器
(以node1节点为例)
[root@12crac1~]#cat/etc/redhat-release
Red Hat Enterprise Linux Server release6.4(Santiago)
[root@12crac1~]#uname-a
https://www.doczj.com/doc/366322618.html,2.6.39-400.17.1.el6uek.x86_64#1SMP Fri Feb2218:16:18PST2013x86_64 x86_64x86_64GNU/Linux
[root@12crac1~]#grep MemTotal/proc/meminfo
MemTotal:2051748kB
[root@12crac1~]#grep SwapTotal/proc/meminfo
SwapTotal:5119996kB
[root@12crac1~]#df-h
Filesystem Size Used Avail Use%Mounted on
/dev/sda345G16G27G38%/
tmpfs 2.0G652M 1.4G32%/dev/shm
/dev/sda1194M50M135M27%/boot
网络配置信息:
备注:从下面信息中可以发现,每个节点服务器我都添加了五个网卡,eth0用于PUBLIC,而eth1~eth4用于Private,本想采用HAIP特性。
但我在安装实验过程中HAIP特性上发生了节点2无法启动ASM实例的问题,因此最后只用了其中eth1接口。
至于HAIP导致的问题,可能是出于BUG,这个问题还有待仔细troubleshooting。
(节点1)
eth0Link encap:Ethernet HWaddr00:0C:29:75:36:ED
inet addr:192.168.1.150Bcast:192.168.1.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe75:36ed/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:64errors:0dropped:0overruns:0frame:0
TX packets:56errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:7014(6.8KiB)TX bytes:6193(6.0KiB)
eth1Link encap:Ethernet HWaddr00:0C:29:75:36:F7
inet addr:192.168.80.150Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe75:36f7/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:12errors:0dropped:0overruns:0frame:0
TX packets:12errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:720(720.0b)TX bytes:720(720.0b)
eth2Link encap:Ethernet HWaddr00:0C:29:75:36:01
inet addr:192.168.80.151Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe75:3601/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:9errors:0dropped:0overruns:0frame:0
TX packets:10errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:540(540.0b)TX bytes:636(636.0b)
eth3Link encap:Ethernet HWaddr00:0C:29:75:36:0B
inet addr:192.168.80.152Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe75:360b/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:5errors:0dropped:0overruns:0frame:0
TX packets:10errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:300(300.0b)TX bytes:636(636.0b)
eth4Link encap:Ethernet HWaddr00:0C:29:75:36:15
inet addr:192.168.80.153Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe75:3615/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:1errors:0dropped:0overruns:0frame:0
TX packets:9errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:60(60.0b)TX bytes:566(566.0b)
inet addr:127.0.0.1Mask:255.0.0.0
inet6addr:::1/128Scope:Host
UP LOOPBACK RUNNING MTU:16436Metric:1
RX packets:0errors:0dropped:0overruns:0frame:0
TX packets:0errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RX bytes:0(0.0b)TX bytes:0(0.0b)
(节点2)
[root@12crac2~]#ifconfig
eth0Link encap:Ethernet HWaddr00:0C:29:A1:81:7C
inet addr:192.168.1.151Bcast:192.168.1.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fea1:817c/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:126errors:0dropped:0overruns:0frame:0
TX packets:62errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:10466(10.2KiB)TX bytes:6193(6.0KiB)
eth1Link encap:Ethernet HWaddr00:0C:29:A1:81:86
inet addr:192.168.80.154Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fea1:8186/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:23errors:0dropped:0overruns:0frame:0
TX packets:27errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:2081(2.0KiB)TX bytes:1622(1.5KiB)
eth2Link encap:Ethernet HWaddr00:0C:29:A1:81:90
inet addr:192.168.80.155Bcast:192.168.80.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fea1:8190/64Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:1errors:0dropped:0overruns:0frame:0
TX packets:10errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:60(60.0b)TX bytes:636(636.0b)
eth3Link encap:Ethernet HWaddr00:0C:29:A1:81:9A
inet addr:192.168.80.156Bcast:192.168.80.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:0errors:0dropped:0overruns:0frame:0
TX packets:0errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:0(0.0b)TX bytes:0(0.0b)
eth4Link encap:Ethernet HWaddr00:0C:29:A1:81:A4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0errors:0dropped:0overruns:0frame:0
TX packets:0errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:0(0.0b)TX bytes:0(0.0b)
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
inet6addr:::1/128Scope:Host
UP LOOPBACK RUNNING MTU:16436Metric:1
RX packets:0errors:0dropped:0overruns:0frame:0
TX packets:0errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RX bytes:0(0.0b)TX bytes:0(0.0b)
确认防火墙和SELinux是禁用的
(以Node1为例,两个节点相同)
[root@12crac1~]#iptables-L
Chain INPUT(policy ACCEPT)
target prot opt source destination
Chain FORWARD(policy ACCEPT)
target prot opt source destination
Chain OUTPUT(policy ACCEPT)
target prot opt source destination
如果防火墙没禁用,那么通过如下方式修改:
[root@12crac1~]#service iptables stop
[root@12crac1~]#chkconfig iptables off
[root@12crac1~]#getenforce
Disabled
如果SELinux没有被禁止,那就通过如下方式修改:
[root@12crac1~]#cat/etc/selinux/config
--改成SELINUX=disabled
#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
[root@dns12c~]#cat/etc/redhat-release
Red Hat Enterprise Linux Server release5.8(Tikanga)
[root@dns12c~]#uname-a
Linux https://www.doczj.com/doc/366322618.html,2.6.32-300.10.1.el5uek#1SMP Wed Feb2217:37:40EST2012x86_64x86_64 x86_64GNU/Linux
[root@dns12c~]#grep MemTotal/proc/meminfo
MemTotal:494596kB
[root@dns12c~]#grep SwapTotal/proc/meminfo
SwapTotal:3277252kB
[root@dns12c~]#ifconfig
eth0Link encap:Ethernet HWaddr00:0C:29:7A:FD:82
inet addr:192.168.1.158Bcast:192.168.1.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1
RX packets:114941errors:0dropped:0overruns:0frame:0
TX packets:6985errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RX bytes:11015974(10.5MiB)TX bytes:1151788(1.0MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436Metric:1
RX packets:104errors:0dropped:0overruns:0frame:0
TX packets:104errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RX bytes:9531(9.3KiB)TX bytes:9531(9.3KiB)
Iptables和SELinux也禁止。
3.3SAN服务器
Openfiler2.3来部署的,在这里分配3个LUN,大小分别为5G和两个8G。
4.正式部署安装
4.1配置DNS服务
以下操作在DNS服务器上进行。
4.1.1安装bind三个包
[root@dns12c~]#rpm-ivh/mnt/Server/bind-9.3.6-20.P1.el5.x86_64.rpm
[root@dns12c~]#rpm-ivh/mnt/Server/bind-chroot-9.3.6-20.P1.el5.x86_64.rpm
[root@dns12c~]#rpm-ivh/mnt/Server/caching-nameserver-9.3.6-20.P1.el5.x86_64.rpm
4.1.2配置主区域
#cd/var/named/chroot/etc
#cp-p named.caching-nameserver.conf named.conf
[root@dns12c etc]#cat named.conf
options{
listen-on-v6port53{::1;};
directory"/var/named";
dump-file"/var/named/data/cache_dump.db";
statistics-file"/var/named/data/named_stats.txt";
memstatistics-file"/var/named/data/named_mem_stats.txt";
//Those options should be used carefully because they disable port
//randomization
//query-source port53;
//query-source-v6port53;
allow-query{any;};
allow-query-cache{any;};
};
logging{
channel default_debug{
file"data/named.run";
severity dynamic;
};
};
view any_resolver{
match-clients{any;};
match-destinations{any;};
recursion yes;
include"/etc/named.zones";
};
#cp-p named.rfc1912.zones named.zones
[root@dns12c etc]#cat named.zones
zone"https://www.doczj.com/doc/366322618.html,"IN{
type master;
file"https://www.doczj.com/doc/366322618.html,.zone";
allow-update{none;};
};
zone"1.168.192.in-addr.arpa"IN{
type master;
file"1.168.192.local";
allow-update{none;};
};
#cd/var/named/chroot/var/named
#cp-p named.zero https://www.doczj.com/doc/366322618.html,.zone
#cp-p named.local1.168.192.local
[root@12crac1named]#cat https://www.doczj.com/doc/366322618.html,.zone
$TTL86400
42;serial (d.adams)
3H;refresh
15M;retry
1W;expiry
1D);minimum IN NS https://www.doczj.com/doc/366322618.html,.
scan IN A192.168.1.154
scan IN A192.168.1.155
scan IN A192.168.1.156
gns IN A192.168.1.157
12crac1IN A192.168.1.150
12crac2IN A192.168.1.151
[root@12crac1named]#cat1.168.192.local
$TTL86400
@IN SOA https://www.doczj.com/doc/366322618.html,.(
1997022700;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
IN NS https://www.doczj.com/doc/366322618.html,.
154IN PTR https://www.doczj.com/doc/366322618.html,.
155IN PTR https://www.doczj.com/doc/366322618.html,.
156IN PTR https://www.doczj.com/doc/366322618.html,.
157IN PTR https://www.doczj.com/doc/366322618.html,.
nslookup或dig检查
4.1.3给两个节点配置DNS
(以Node1为例,两个节点相同)
[root@12crac1~]#cat/etc/resolv.conf
#domain localdomain
search localdomain
nameserver192.168.1.158
4.1.4测试
[root@12crac1~]#nslookup https://www.doczj.com/doc/366322618.html,
Server:192.168.1.158
Address:192.168.1.158#53
Name:https://www.doczj.com/doc/366322618.html,
Address:192.168.1.156
Name:https://www.doczj.com/doc/366322618.html,
Address:192.168.1.154
Name:https://www.doczj.com/doc/366322618.html,
Address:192.168.1.155
[root@12crac1~]#nslookup192.168.1.154
Server:192.168.1.158
Address:192.168.1.158#53
154.1.168.192.in-addr.arpa name=https://www.doczj.com/doc/366322618.html,.
[root@12crac1~]#nslookup192.168.1.155
Server:192.168.1.158
Address:192.168.1.158#53
155.1.168.192.in-addr.arpa name=https://www.doczj.com/doc/366322618.html,.
[root@12crac1~]#nslookup192.168.1.156
Server:192.168.1.158
Address:192.168.1.158#53
156.1.168.192.in-addr.arpa name=https://www.doczj.com/doc/366322618.html,.
4.2配置/etc/hosts
修改/etc/hosts文件,前两行不懂,添加hostname对应信息。
(以Node1为例,两个节点相同)
[root@12crac1~]#cat/etc/hosts
127.0.0.1localhost localhost.localdomain localhost4localhost4.localdomain4 ::1localhost localhost.localdomain localhost6localhost6.localdomain6
#For Public
https://www.doczj.com/doc/366322618.html,12crac1
https://www.doczj.com/doc/366322618.html,12crac2
#For VIP
https://www.doczj.com/doc/366322618.html,
https://www.doczj.com/doc/366322618.html,
#For Private IP
https://www.doczj.com/doc/366322618.html,12crac1-priv1
https://www.doczj.com/doc/366322618.html,12crac1-priv2
https://www.doczj.com/doc/366322618.html,12crac1-priv3
https://www.doczj.com/doc/366322618.html,12crac1-priv4
https://www.doczj.com/doc/366322618.html,12crac2-priv1
https://www.doczj.com/doc/366322618.html,12crac2-priv2
https://www.doczj.com/doc/366322618.html,12crac2-priv3
https://www.doczj.com/doc/366322618.html,12crac2-priv4
#For SCAN IP
#https://www.doczj.com/doc/366322618.html,
#https://www.doczj.com/doc/366322618.html,
#For DNS Server
https://www.doczj.com/doc/366322618.html, dns12c
4.3系统配置
4.3.1修改/etc/sysctl.conf
(以Node1为例,两个节点相同)
[root@12crac1~]#vi/etc/sysctl.conf
添加如下内容:
fs.file-max=6815744
kernel.sem=25032000100128
kernel.shmmni=4096
kernel.shmall=1073741824
kernel.shmmax=4398046511104
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576
net.ipv4.ip_local_port_range=900065500
4.3.2生效
[root@12c~]#sysctl-p
4.3.3修改/etc/security/limits.conf
[root@12crac1~]#vi/etc/security/limits.conf
添加如下内容:
grid soft nofile1024
grid hard nofile65536
grid soft nproc2047
grid hard nproc16384
grid soft stack10240
grid hard stack32768
oracle soft nofile1024
oracle hard nofile65536
oracle soft nproc2047
oracle hard nproc16384
oracle soft stack10240
oracle hard stack32768
4.4配置YUM源并安装所需包
4.4.1配置YUM源
先将默认的yum配置文件删除或者移动,然后创建一个新的(以Node1为例,两个节点相同)
[root@12crac1~]#cd/etc/yum.repos.d
[root@12crac1yum.repos.d]#mkdir bk
[root@12crac1yum.repos.d]#mv public-yum-ol6.repo bk/
--添加如下内容
[Oracle]
name=OEL-$releasever-Media
baseurl=file:///mnt
gpgcheck=0
enabled=1
4.4.2将光驱挂载上
[root@12crac1yum.repos.d]#mount/dev/cdrom/mnt
mount:block device/dev/sr0is write-protected,mounting read-only
4.4.3安装所需包
下面就可以Yum方式安装所需包了
[root@12crac1yum.repos.d]#yum-y install binutils compat-libstdc++-33elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++glibc glibc-common glibc-devel kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel pdksh compat-libcap1
4.5创建用户和组
(以Node1为例,两个节点相同)
4.5.1创建组
[root@12crac1~]#/usr/sbin/groupadd-g54321oinstall
[root@12crac1~]#/usr/sbin/groupadd-g54322dba
[root@12crac1~]#/usr/sbin/groupadd-g54323oper
[root@12crac1~]#/usr/sbin/groupadd-g54324backupdba
[root@12crac1~]#/usr/sbin/groupadd-g54325dgdba
[root@12crac1~]#/usr/sbin/groupadd-g54327asmdba
[root@12crac1~]#/usr/sbin/groupadd-g54328asmoper
[root@12crac1~]#/usr/sbin/groupadd-g54329asmadmin
4.5.2创建用户
[root@12crac1~]#/usr/sbin/useradd-u54321-g oinstall-G asmadmin,asmdba,asmoper,dba grid
[root@12crac1~]#/usr/sbin/useradd-u54322-g oinstall-G dba,backupdba,dgdba,asmadmin oracle
4.5.3设置口令
[root@12crac1~]#passwd grid
[root@12crac1~]#passwd oracle
4.6创建安装目录以及授权
(以Node1为例,两个节点相同)
[root@12crac1~]#mkdir-p/u01/app/grid
[root@12crac1~]#mkdir-p/u01/app/12.1.0/grid
[root@12crac1~]#mkdir-p/u01/app/oracle/product/12.1.0/db_1
[root@12crac1~]#chown-R grid.oinstall/u01
[root@12crac1~]#chown-R oracle.oinstall/u01/app/oracle
[root@12crac1~]#chmod-R775/u01
4.7配置境变量
节点1:
[root@12crac1~]#vi/home/grid/.bash_profile
export TMP=/tmp
export ORACLE_HOSTNAME=https://www.doczj.com/doc/366322618.html,
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.1.0/grid
export ORACLE_SID=+ASM1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias sqlplus="rlwrap sqlplus"
[root@12crac1~]#vi/home/oracle/.bash_profile
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=https://www.doczj.com/doc/366322618.html,
export ORACLE_UNQNAME=luocs12c1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=luocs12c1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
节点2:
[root@12crac2~]#vi/home/grid/.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=https://www.doczj.com/doc/366322618.html,
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.1.0/grid
export ORACLE_SID=+ASM1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib alias sqlplus="rlwrap sqlplus"
[root@12crac2~]#vi/home/oracle/.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_UNQNAME=luocs12c2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=luocs12c2
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
4.8Iscsi挂载磁盘并配置UDEV
[root@12cr~]#yum-y install iscsi-initiator-utils
[root@12cr~]#service iscsid start
[root@12cr~]#chkconfig iscsid on
[root@12cr~]#iscsiadm-m discovery-t sendtargets-p192.168.80.140:3260
[OK]iscsid:[OK]
192.168.80.140:3260,https://www.doczj.com/doc/366322618.html,.openfiler:tsn.3a9cad78121d
[root@12cr~]#service iscsi restart
Stopping iscsi:[OK]
Starting iscsi:[OK]
[root@12crac1~]#fdisk-l
Disk/dev/sda:53.7GB,53687091200bytes
255heads,63sectors/track,6527cylinders
Units=cylinders of16065*512=8225280bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00046ecd
Device Boot Start End Blocks Id System
/dev/sda1*12620480083Linux
Partition1does not end on cylinder boundary.
/dev/sda226664512000082Linux swap/Solaris
Partition2does not end on cylinder boundary.
/dev/sda366465284710297683Linux
Disk/dev/sdb:2147MB,2147483648bytes
67heads,62sectors/track,1009cylinders
Units=cylinders of4154*512=2126848bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk/dev/sdc:10.5GB,10502537216bytes
64heads,32sectors/track,10016cylinders
Units=cylinders of2048*512=1048576bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00000000
Disk/dev/sdd:6610MB,6610223104bytes
204heads,62sectors/track,1020cylinders
Units=cylinders of12648*512=6475776bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00000000
Disk/dev/sdf:8388MB,8388608000bytes
64heads,32sectors/track,8000cylinders
Units=cylinders of2048*512=1048576bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00000000
Disk/dev/sde:8388MB,8388608000bytes
64heads,32sectors/track,8000cylinders
Units=cylinders of2048*512=1048576bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00000000
Disk/dev/sdg:5335MB,5335154688bytes
165heads,62sectors/track,1018cylinders
Units=cylinders of10230*512=5237760bytes
Sector size(logical/physical):512bytes/512bytes
I/O size(minimum/optimal):512bytes/512bytes
Disk identifier:0x00000000
在这里我只用sde、sdf、sdg,其他的是给别的集群使用的。
[root@12crac1~]#for i in e f g;do
>echo"KERNEL==\"sd*\",BUS==\"scsi\",PROGRAM==\"/sbin/scsi_id--whitelisted--replace-whites pace--device=/dev/\$name\",RESULT==\"`/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev /sd$i`\",NAME=\"asm-disk$i\",OWNER=\"grid\",GROUP=\"asmadmin\",MODE=\"0660\""
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted --replace-whitespace--device=/dev/$name",RESULT=="14f504e46494c450058444273784d2d64705a6a2 d544c4756",NAME="asm-diske",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted--replace-whitespace--device =/dev/$name",RESULT=="14f504e46494c45003030365263642d32714a702d6866744c",NAME="asm-di skf",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted--replace-whitespace--device =/dev/$name",RESULT=="14f504e46494c45006c58576a76452d716d50492d71436c76",NAME="asm-dis kg",OWNER="grid",GROUP="asmadmin",MODE="0660"
配置UDEV:
(以Node1为例,两个节点相同)
[root@12crac1~]#vi/etc/udev/rules.d/99-oracle-asmdevices.rules
--添加如下内容:
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted--replace-whitespace--device =/dev/$name",RESULT=="14f504e46494c45003030365263642d32714a702d6866744c",NAME="asm-da ta",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted--replace-whitespace--device =/dev/$name",RESULT=="14f504e46494c4500796861656a6b2d3632475a2d66384631",NAME="asm-fra ",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id--whitelisted--replace-whitespace--device =/dev/$name",RESULT=="14f504e46494c45006c58576a76452d716d50492d71436c76",NAME="asm-crs ",OWNER="grid",GROUP="asmadmin",MODE="0660"
[root@12crac1~]#/sbin/start_udev
Starting udev:[OK]
[root@12crac1~]#ls-l/dev/asm*
brw-rw----1grid asmadmin8,96Jun2921:56/dev/asm-crs
brw-rw----1grid asmadmin8,64Jun2921:56/dev/asm-data
brw-rw----1grid asmadmin8,80Jun2921:56/dev/asm-fra
4.9禁用NTP服务
(以Node1为例,两个节点相同)
[root@12crac1~]#chkconfig ntpd off
[root@12crac1~]#mv/etc/ntp.conf/etc/ntp.conf.bak
4.10解压介质
节点1:
[root@12crac1~]#chown-R grid.oinstall/install/
[root@12crac1~]#chown oracle.oinstall/install/linuxamd64_12c_database_*
[root@12crac1~]#chmod775/install
[root@12crac1~]#su-grid
[root@12crac1~]#cd/install/
[grid@12crac1install]$unzip linuxamd64_12c_grid_1of2.zip
[grid@12crac1install]$unzip linuxamd64_12c_grid_2of2.zip
[oracle@12crac1install]$unzip linuxamd64_12c_database_1of2.zip
解压之后大小为:
[oracle@12crac1install]$du-sh grid
2.1G grid
[oracle@12crac1install]$du-sh database/
2.6G database/
安装cvu相关rpm包:
[root@12crac1~]#cd/install/grid/rpm/
[root@12crac1rpm]#rpm-ivh cvuqdisk-1.0.9-1.rpm
Preparing...###########################################[100%]
Using default group oinstall to install package
1:cvuqdisk###########################################[100%]拷贝到节点2并安装:
[root@12crac1rpm]#scp cvuqdisk-1.0.9-1.rpm12crac2:/install
[root@12crac2install]#rpm-ivh cvuqdisk-1.0.9-1.rpm
Preparing...###########################################[100%]
Using default group oinstall to install package
1:cvuqdisk###########################################[100%]
4.11校验
这里只贴失败的项,其中第一个是物理内存不足问题,Oracle推荐每节点至少4GB内存空间,我这里只有2G;第二个问题是配置DNS,这个问题我们可以忽略。
节点1:
[grid@12crac1grid]$./runcluvfy.sh stage-pre crsinst-n12crac1,12crac2-verbose
Check:Total memory
Node Name Available Required Status
----------------------------------------------------------------------
12crac2 1.9567GB(2051748.0KB)4GB(4194304.0KB)failed
12crac1 1.9567GB(2051748.0KB)4GB(4194304.0KB)failed
Result:Total memory check failed
Result:Default user file creation mask check passed
Checking integrity of file"/etc/resolv.conf"across nodes
Checking the file"/etc/resolv.conf"to make sure only one of domain and search entries is defined
"domain"and"search"entries do not coexist in any"/etc/resolv.conf"file
Checking if domain entry in file"/etc/resolv.conf"is consistent across the nodes...
"domain"entry does not exist in any"/etc/resolv.conf"file
Checking if search entry in file"/etc/resolv.conf"is consistent across the nodes...
Checking file"/etc/resolv.conf"to make sure that only one search entry is defined
More than one"search"entry does not exist in any"/etc/resolv.conf"file
All nodes have same"search"order defined in file"/etc/resolv.conf"
Checking DNS response time for an unreachable node
------------------------------------------------------------
12crac1failed
12crac2failed
PRVF-5636:The DNS response time for an unreachable node exceeded"15000"ms on following nodes: 12crac1,12crac2
Check for integrity of file"/etc/resolv.conf"failed
4.12安装
4.12.1安装GI
[root@12cr~]#su-grid
[grid@12cr~]$cd/install/grid/
我打开Xmanager-Passive,设置DISPLAY,调用runInstaller启动OUI
[grid@12cr grid]$export DISPLAY=192.168.1.1:0.0
[grid@12cr grid]$./runInstaller