• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

虚拟机安装Oracle RAC

互联网 diligentman 3小时前 2次浏览

服务器信息:
节点一:192.168.10.2 dbm1
节点二:192.168.10.3 dbm2
操作系统均为红帽6.9
ip信息

public ip

192.168.10.2 dbm1
192.168.10.3 dbm2

private ip

10.10.0.4 dbm1-priv
10.10.0.5 dbm2-priv

vip

192.168.10.4 dbm1-vip
192.168.10.5 dbm2-vip

scan

192.168.10.6 scan

需要的安装
cvuqdisk-1.0.9-1.rpm,pdksh-5.2.14-37.el5_8.1.x86_64.rpm,rlwrap-0.41-1.el6.x86_64.rpm,p13390677_112040_Linux-x86-64_1of7.zip,p13390677_112040_Linux-x86-64_2of7.zip,p13390677_112040_Linux-x86-64_3of7.zip,rhel-server-6.9-x86_64-dvd.iso,shell RAC.zip

双节点配置如下
[root@localhost apps]# vi /etc/sysconfig/network
[root@localhost apps]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dbm1
[root@localhost apps]#
修改主机名,节点二修改为dbm2

[root@dbm1 ~]# chkconfig –level 2345 iptables off
[root@dbm1 ~]# chkconfig –level 2345 ip6tables off
[root@dbm1 ~]# service iptables stop
[root@dbm1 ~]# service ip6tables stop
[root@dbm1 ~]# vi /etc/sysconfig/selinux 修改为SELINUX=disabled
关闭服务

[root@dbm1 ~]# mkdir /mnt/cdrom
[root@dbm1 ~]# mount /apps/rhel-server-6.9-x86_64-dvd.iso /mnt/cdrom/ -o loop
[root@dbm1 ~]# vi /etc/yum.repos.d/rhel-source.repo
[root@dbm1 ~]# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta – $basearch – Source
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
[root@dbm1 ~]#
安装配置源

[root@dbm1 ~]# yum -y install binutils* compat* elfutils* gcc-c* gcc* glibc* libaio* libgcc* libstdc* numactl* sysstat* unixODBC* make* compat* lib* ksh*
[root@dbm1 ~]# rpm -qa | grep ksh
ksh-20120801-33.el6.x86_64
[root@dbm1 ~]# rpm -e ksh-20120801-33.el6.x86_64
[root@dbm1 ~]# rpm -ivh /apps/pdksh-5.2.14-37.el5_8.1.x86_64.rpm
[root@dbm1 ~]# yum install readline-*
[root@dbm1 ~]# rpm -ivh /apps/rlwrap-0.41-1.el6.x86_64.rpm
[root@dbm1 ~]# rlwrap -v
rlwrap 0.41
[root@dbm1 ~]#
安装依赖包

[root@dbm1 ~]# yum groupinstall ‘X Window System’ Base Setup Desktop
[root@dbm1 ~]# yum install tigervnc tigervnc-server
[root@dbm1 ~]# vi /etc/sysconfig/vncservers
[root@dbm1 ~]# cat /etc/sysconfig/vncservers
虚拟机安装Oracle RAC
安装桌面环境以及VNC此操作至需要在节点一进行(vncpasswd 给root,oracle,grid三个用户设置密码,在启动即可)

[root@dbm1 apps]# unzip shell RAC.zip
Archive: shell RAC.zip
inflating: 5preprofile.sh
inflating: 6presysctl.sh
inflating: 1preusers.sh
inflating: 2predir.sh
inflating: 3prelimits.sh
inflating: 4prelogin.sh
[root@dbm1 apps]# sh 1preusers.sh
Now create 6 groups named ‘oinstall’,‘dba’,‘asmadmin’,‘asmdba’,‘asmoper’,‘oper’
Plus 2 users named ‘oracle’,‘grid’,Also setting the Environment
更改用户 grid 的密码 。
passwd: 所有的身份验证令牌已经成功更新。
更改用户 oracle 的密码 。
passwd: 所有的身份验证令牌已经成功更新。
The Groups and users has been created
The Environment for grid,oracle also has been set successfully
[root@dbm1 apps]# sh 2predir.sh
Now create the necessary directory for oracle,grid users and change the authention to oracle,grid users…
The necessary directory for oracle,grid users and change the authention to oracle,grid users has been finished
[root@dbm1 apps]# sh 3prelimits.sh
Now modify the /etc/security/limits.conf,but backup it named /etc/security/limits.conf.bak before
Modifing the /etc/security/limits.conf has been succeed.
[root@dbm1 apps]# sh 4prelogin.sh
Now modify the /etc/pam.d/login,but with abackup named /etc/pam.d/login.bak
Modifing the /etc/pam.d/login has been succeed.
[root@dbm1 apps]# sh 5preprofile.sh
Now modify the /etc/profile,but with a backup named /etc/profile.bak
Modifing the /etc/profile has been succeed.
[root@dbm1 apps]# sh 6presysctl.sh
Now modify the /etc/sysctl.conf,but with a backup named /etc/sysctl.bak
Modifing the /etc/sysctl.conf has been succeed.
Now make the changes take effect…
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.core.rmem_default = 33554432
net.core.rmem_max = 33554432
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
[root@dbm1 apps]#
创建用户,修改内核配置文件等

[root@dbm1 apps]# rpm -ivh cvuqdisk-1.0.9-1.rpm
[root@dbm1 apps]# vi /home/oracle/.bash_profile
[root@dbm1 apps]# cat /home/grid/.bash_profile
虚拟机安装Oracle RAC

[root@dbm1 apps]# cat /home/oracle/.bash_profile
虚拟机安装Oracle RAC
[root@dbm2 apps]# cat /home/grid/.bash_profile
虚拟机安装Oracle RAC

[root@dbm2 apps]# cat /home/oracle/.bash_profile
虚拟机安装Oracle RAC

[root@dbm2 apps]#
安装cvu包,查看环境变量

[root@dbm1 apps]# scsi_id -g -u /dev/sda
3639f0e78b0450c08b1a07da9878f97e9
[root@dbm1 apps]# scsi_id -g -u /dev/sdc
369bc040e2042a20b3200865aded14057
[root@dbm1 apps]# scsi_id -g -u /dev/sdb
36a910c2e704979084c206aec0abba9c1
[root@dbm1 apps]# parted /dev/sda
(parted) P
Model: SANGFOR VIRTUAL-DISK (scsi)
Disk /dev/sda: 2199GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name 标志
1 1049kB 2000MB 1999MB ocr
2 2000MB 10.0GB 8001MB test
3 10.0GB 1000GB 990GB DATA
4 1000GB 2199GB 1199GB DATA1
Partition Table: gpt

Number Start End Size File system Name 标志
1 1049kB 1000GB 1000GB DATA2
2 1000GB 2199GB 1199GB DATA3
Partition Table: gpt

Number Start End Size File system Name 标志
1 1049kB 1000GB 1000GB FRA
2 1000GB 2199GB 1199GB FRA1

[root@dbm1 ~]#
[root@dbm1 ~]# cat /etc/udev/rules.d/90-dm.rules
KERNEL==“sdb1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk1”, MODE=“0660”
KERNEL==“sdb2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk2”, MODE=“0660”
KERNEL==“sdb3”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk3”, MODE=“0660”
KERNEL==“sdb4”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk4”, MODE=“0660”
KERNEL==“sdc1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk5”, MODE=“0660”
KERNEL==“sdc2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk6”, MODE=“0660”
KERNEL==“sda1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk7”, MODE=“0660”
KERNEL==“sda2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk8”, MODE=“0660”
[root@dbm1 ~]# ll /dev/asmdisk*
brw-rw—- 1 grid asmadmin 8, 17 11月 25 11:31 /dev/asmdisk1
brw-rw—- 1 grid asmadmin 8, 18 11月 25 11:31 /dev/asmdisk2
brw-rw—- 1 grid asmadmin 8, 19 11月 25 11:31 /dev/asmdisk3
brw-rw—- 1 grid asmadmin 8, 20 11月 25 11:31 /dev/asmdisk4
brw-rw—- 1 grid asmadmin 8, 33 11月 25 11:31 /dev/asmdisk5
brw-rw—- 1 grid asmadmin 8, 34 11月 25 11:31 /dev/asmdisk6
brw-rw—- 1 grid asmadmin 8, 1 11月 25 11:31 /dev/asmdisk7
brw-rw—- 1 grid asmadmin 8, 2 11月 25 11:31 /dev/asmdisk8
[root@dbm1 ~]#

[root@dbm2 ~]# cat /etc/udev/rules.d/90-dm.rules
KERNEL==“sdb1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk1”, MODE=“0660”
KERNEL==“sdb2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk2”, MODE=“0660”
KERNEL==“sdb3”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk3”, MODE=“0660”
KERNEL==“sdb4”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk4”, MODE=“0660”
KERNEL==“sdc1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk5”, MODE=“0660”
KERNEL==“sdc2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk6”, MODE=“0660”
KERNEL==“sda1”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk7”, MODE=“0660”
KERNEL==“sda2”, SUBSYSTEM==“block”, OWNER=“grid”, GROUP=“asmadmin”,NAME=“asmdisk8”, MODE=“0660”
[root@dbm2 ~]# ll /dev/asmdisk*
brw-rw—- 1 grid asmadmin 8, 17 11月 25 11:36 /dev/asmdisk1
brw-rw—- 1 grid asmadmin 8, 18 11月 25 11:36 /dev/asmdisk2
brw-rw—- 1 grid asmadmin 8, 19 11月 25 11:36 /dev/asmdisk3
brw-rw—- 1 grid asmadmin 8, 20 11月 25 11:36 /dev/asmdisk4
brw-rw—- 1 grid asmadmin 8, 33 11月 25 11:36 /dev/asmdisk5
brw-rw—- 1 grid asmadmin 8, 34 11月 25 11:36 /dev/asmdisk6
brw-rw—- 1 grid asmadmin 8, 1 11月 25 11:36 /dev/asmdisk7
brw-rw—- 1 grid asmadmin 8, 2 11月 25 11:36 /dev/asmdisk8
[root@dbm2 ~]#

因为是虚拟机,可以不做多路径,直接配置磁盘权限即可(俩个节点)

配置心跳解压安装包开始安装GR
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC

开始安装数据库软件
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC

虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC

虚拟机安装Oracle RAC
虚拟机安装Oracle RAC

创建ASM磁盘组
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
DBCA建库
虚拟机安装Oracle RAC

虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC
虚拟机安装Oracle RAC

虚拟机安装Oracle RAC
虚拟机安装Oracle RAC


程序员灯塔
转载请注明原文链接:虚拟机安装Oracle RAC
喜欢 (0)