2020-12-21 乐帮网
oracle
前面几章介绍了在Exis中安装Oracle Linux7的过程,安装完成后做一些基本的配置,都是针对硬件的一些配置,使用相同的配置安装三个Oracle Linux7系统做为节点一样的硬件配置,唯一的区别是分配硬盘的那部分,除做crs主机的那个节点有三个硬盘外,其余的都不需要分配额外的硬盘资源,只需要30G能安装系统即可。
在安装好系统后我们开始安装Oracle Grid。在安装之前还需要很多配置需要提前做好,下面细说配置过程。
(1) 创建用户
创建GRID用户,创建oinstall组DBA组
在node1上执行,命令如下:有部分已经存在不必理会
[root@localhost dev]# groupadd -g 501 oinstall
groupadd: group 'oinstall' already exists
[root@localhost dev]# groupadd -g 502 dba
groupadd: group 'dba' already exists
[root@localhost dev]# groupadd -g 504 asmadmin
[root@localhost dev]# groupadd -g 506 asmdba
[root@localhost dev]# groupadd -g 507 asmoper
[root@localhost dev]# ^C
[root@localhost dev]# cat /etc/group
root:x:0:
bin:x:1:
daemon:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mem:x:8:
kmem:x:9:
wheel:x:10:
cdrom:x:11:
mail:x:12:postfix
man:x:15:
dialout:x:18:
floppy:x:19:
games:x:20:
tape:x:30:
video:x:39:
ftp:x:50:
lock:x:54:
audio:x:63:
nobody:x:99:
users:x:100:
utmp:x:22:
utempter:x:35:
ssh_keys:x:999:
systemd-journal:x:190:
dbus:x:81:
polkitd:x:998:
unbound:x:997:
colord:x:996:
dip:x:40:
usbmuxd:x:113:
cgred:x:995:
stapusr:x:156:
stapsys:x:157:
stapdev:x:158:
saslauth:x:76:
libstoragemgmt:x:994:
avahi:x:70:
kvm:x:36:qemu
qemu:x:107:
avahi-autoipd:x:170:
rpc:x:32:
rpcuser:x:29:
nfsnobody:x:65534:
rtkit:x:172:
chrony:x:993:
ntp:x:38:
mysql:x:27:
radvd:x:75:
abrt:x:173:
pulse-access:x:992:
pulse:x:171:
gdm:x:42:
gnome-initial-setup:x:991:
slocate:x:21:
postdrop:x:90:
postfix:x:89:
sshd:x:74:
tcpdump:x:72:
hy:x:1000:hy
oinstall:x:54321:
dba:x:54322:oracle
asmadmin:x:504:
asmdba:x:506:
asmoper:x:507:
[root@localhost dev]# useradd -u 501 -g oinstall -G oinstall,dba,asmadmin,asmdba,asmoper grid
[root@localhost dev]# useradd -u 502 -g oinstall -G dba,asmdba oracle
useradd: user 'oracle' already exists
[root@localhost dev]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
(2)安装依赖包cvuqdisk
cvuqdisk是安装Oracle Gird必须的软件包,可以从oracle 数据库的安装包里找rpm目录下cvuqdisk-1.0.7-1.rpm,也可以从网上下载,下载地址:http://www.oracle.com/technetwork/products/clustering/downloads/cvu-download-homepage-099973.html
我直接从grid软件rpm(目录)中解压找到 cvuqdisk-1.0.7-1.rpm。使用如下命令安装
[root@localhost soft]# cd grid/
[root@localhost grid]# ls
doc install response rpm runcluvfy.sh runInstaller sshsetup stage welcome.html
[root@localhost grid]# cd rpm/
[root@localhost rpm]# ls
cvuqdisk-1.0.7-1.rpm
[root@localhost rpm]# rpm -ivh cvuqdisk-1.0.7-1.rpm
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
(3)配置主机名
[root@e7node1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=e7node1
# Created by anaconda
# oracle-rdbms-server-11gR2-preinstall : Add NOZEROCONF=yes
NOZEROCONF=yes
[root@e7node1 ~]# cat /etc/hostname
e7node1
需要注意的是三节点都需要做相应的配置,只是主机名称不一样,分别为e7node1,e7node2,e7node3。
(4)三个节点分别配置IP 如下
Node1
[root@e7node1 network-scripts]# cd /etc/sysconfig/network-scripts
[root@e7node1 network-scripts]# ls ifc*
ifcfg-eno16782080 ifcfg-eno33561344 ifcfg-lo
[root@e7node1 network-scripts]# cat ifcfg-eno16782080
HWADDR="00:0C:29:33:EF:B1"
TYPE="Ethernet"
#BOOTPROTO="dhcp"
BOOTPROTO="static"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16782080"
UUID="2e92ce7f-026a-4aee-8f49-193760ad824e"
ONBOOT="yes"
IPADDR="10.14.26.232"
NETMASK="255.255.254.0"
GATEWAY="10.14.26.1"
DNS1="222.222.222.222"
DNS2="111.11.1.1"
[root@e7node1 network-scripts]# cat ifcfg-eno33561344
HWADDR=00:0C:29:33:EF:BB
TYPE=Ethernet
#BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno33561344
UUID=1f297a8d-b9a0-4f58-b0a8-7e2abd57abb2
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.21.5
NETMASK=255.255.255.0
Node2
[root@e7node2 ~]# cd /etc/sysconfig/network-scripts
[root@e7node2 network-scripts]# cat ifcfg-eno16782080
HWADDR="00:0c:29:f1:60:47"
TYPE="Ethernet"
#BOOTPROTO="dhcp"
BOOTPROTO="static"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16782080"
UUID="2e92ce7f-026a-4aee-8f49-193760ad824e"
ONBOOT="yes"
IPADDR="10.14.26.130"
NETMASK="255.255.254.0"
GATEWAY="10.14.26.1"
DNS1="222.222.222.222"
DNS2="111.11.1.1"
[root@e7node2 network-scripts]# cat ifcfg-eno33561344
HWADDR=00:0c:29:f1:60:51
TYPE=Ethernet
#BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno33561344
UUID=1f297a8d-b9a0-4f58-b0a8-7e2abd57abb2
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.21.6
NETMASK=255.255.255.0
Node3
[root@e7node3 ~]# cd /etc/sysconfig/network-scripts
[root@e7node3 network-scripts]# cat ifcfg-eno16782080
HWADDR="00:0C:29:33:EF:B1"
TYPE="Ethernet"
#BOOTPROTO="dhcp"
BOOTPROTO="static"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16782080"
UUID="2e92ce7f-026a-4aee-8f49-193760ad824e"
ONBOOT="yes"
IPADDR="10.14.26.231"
NETMASK="255.255.254.0"
GATEWAY="10.14.26.1"
DNS1="222.222.222.222"
DNS2="111.11.1.1"
[root@e7node3 network-scripts]# cat ifcfg-eno33561344
HWADDR=00:0C:29:33:EF:BB
TYPE=Ethernet
#BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno33561344
UUID=1f297a8d-b9a0-4f58-b0a8-7e2abd57abb2
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.21.7
NETMASK=255.255.255.0
(5)配置Host文件
配置 hosts 文件(三个节点一样)如下:
[root@e7node1 network-scripts]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#node1
10.14.26.232 e7node1 e7node1.rac.com
192.168.21.5 e7node1-priv e7node1-priv.rac.com
10.14.26.205 e7node1-vip e7node1-vip.rac.com
#node2
10.14.26.130 e7node2 e7node2.rac.com
192.168.21.6 e7node2-priv e7node2-priv.rac.com
10.14.26.206 e7node2-vip e7node2-vip.rac.com
#node3
10.14.26.231 e7node3 e7node3.rac.com
192.168.21.7 e7node3-priv e7node3-priv.rac.com
10.14.26.207 e7node3-vip e7node3-vip.rac.com
#scanip
10.14.26.111 e7-scan
原创作品,禁止转载!
Oracle RAC 搭建系列目录:
Oracle RAC 集群搭建 Oracle Linux crs主机(二)
Oracle RAC 集群搭建 安装Oracle Grid前配置(四)
Oracle RAC 集群搭建 安装oracleasm(五)
关注我的微信公众号
在公众号里留言交流
投稿邮箱:1052839972@qq.com
庭院深深深几许?杨柳堆烟,帘幕无重数。
玉勒雕鞍游冶处,楼高不见章台路。
雨横风狂三月暮。门掩黄昏,无计留春住。
泪眼问花花不语,乱红飞过秋千去。
如果感觉对您有帮助
欢迎向作者提供捐赠
这将是创作的最大动力