百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 优雅编程 > 正文

Oracle 11gR2 RAC 安装流程 - 6(oracle 18c rac安装)

sinye56 2024-09-21 02:27 3 浏览 0 评论

安装Grid

7.1 解压安装包

以root身份解压grid安装包和database安装包。

Node1:

[root@tim1 ~]#cd /soft
[root@tim1 soft]#ls

asm linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@tim1 soft]#unzip linux_11gR2_grid.zip
[root@tim1 soft]#unzip linux_11gR2_database_1of2.zip
[root@tim1 soft]#unzip linux_11gR2_database_2of2.zip

7.2 矫正时间

root用户在Node1和Node2下操作,以Node1的时间为基准,使用date -s命令在两节点上同时进行,误差几秒没关系。

7.3检查两个节点的共享盘

看到的共享盘ASMDisk已经准备就绪。

Node1:

[root@tim1 ~]#ll /dev/raw/raw*

Node2:同上

[root@tim2 ~]#ll /dev/raw/raw* 两节点看到的盘一致。

可以在安装grid 之前先做个检查。

[root@tim1 ~]# su - grid
[grid@tim1 ~]$ cd /soft/grid
[grid@tim1 grid]$ ./runcluvfy.sh stage -pre -h
[grid@tim1 grid]$ ./runcluvfy.sh stage -pre crsinst -n tim1,tim2

7.4启动GRID安装界面

1)启动Xmanager Passive,一般端口是[:0.0]

DISPLAY的意思是把图形显示到某个客户端上,这里是win7本地

SCAN Name按照/etc/hosts改。

Grid只认出了Node1节点,Node2需要手动添加一下。

公网、私网的网段要正确。

使用ASM,Oracle11gR2取消了raw选项。

2)配置yum install安装工具

yum工具可以自动解决软件包之间的依赖关系,使用之前要先创建软件仓库。

【创建方法】:

Node1:(root用户执行)

[root@tim1 ~]# cd /etc/yum.repos.d

进入到该目录下生成一个配置文件:

[root@tim1 yum.repo]# ls
[root@tim1 yum.repos.d]# cp rhel-debuginfo.repo yum.repo
[root@tim1 yum.repos.d]#vi yum.repo

文件内容改为如下:

[base]
name=Red Hat Enterprise Linux
baseurl=file:///media/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

media这个就是安装光盘挂载所在位置,Server下就是一些安装包,S是大写。enabled=1表示启动,gpgcheck=0表示校验关闭。

把yum.repo复制到Node2

[root@tim2 ~]# cd /etc/yum.repos.d/
[root@tim2 yum.repos.d]# scp tim1:/etc/yum.repos.d/yum.repo ./
root@tim1's password: beijing
yum.repo 100% 146 0.1KB/s 00:00 Node1:

1)分配linux 安装镜像文件给光驱

这一步相当于把光盘插入光驱。

2)手工mount光盘

[root@tim1 yum.repos.d]#mount /dev/cdrom /media

查看一下目录下文件,看到许多包,至此,yum仓库构建完成。

[root@tim1 yum.repos.d]# ls /media/Server|more 安装时千万不要进入这个目录

3)根据Grid安装界面提示,使用yum安装缺失软件包

[root@tim1 yum.repos.d]# yum install libaio-devel* -y 一定要看到 Complete!才行
[root@tim1 yum.repos.d]# yum install sysstat* -y
[root@tim1 yum.repos.d]# yum install unixODBC-2* -y
[root@tim1 yum.repos.d]# yum install unixODBC-devel* -y
[root@tim1 yum.repos.d]# umount /media

4)别忘了从虚机中移除光驱,否则下次引导不了磁盘。

Node2:同上

【注】:两个节点都要安装这四个包。

不放心也可以验证一下是否装好了这些包,命令如下:

[root@tim1 ~]# rpm -qa libaio-devel*

Check Again继续安装。

3)继续安装Grid

Node1执行第一个脚本(root用户)

[root@tim1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

Node2执行第一个脚本(root用户)

[root@tim2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

Node1 执行第二个脚本(root用户) 【这步才是关键】!!!

[root@tim1 /]# /u01/11.2.0/grid/root.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@tim1 /]# /u01/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2015-11-13 00:02:18: Parsing the host name
2015-11-13 00:02:18: Checking for super user privileges
2015-11-13 00:02:18: User has super user privileges
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'tim1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'tim1'
CRS-2676: Start of 'ora.gipcd' on 'tim1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'tim1'
CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1'
CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'tim1'
CRS-2672: Attempting to start 'ora.diskmon' on 'tim1'
CRS-2676: Start of 'ora.diskmon' on 'tim1' succeeded
CRS-2676: Start of 'ora.cssd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'tim1'
CRS-2676: Start of 'ora.ctssd' on 'tim1' succeeded
ASM created and started successfully.
DiskGroup OCR_VOTE created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'tim1'
CRS-2676: Start of 'ora.crsd' on 'tim1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 4e8f4e6229f84f4abf68122bc013ca1a.
Successful addition of voting disk ae254012f9b14f46bf99e51e57d1c57e.
Successful addition of voting disk 3d4e443c740f4f83bf4bbaa54dfc5936.
Successfully replaced voting disk group with +OCR_VOTE.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 1e7f803c179d4fcfbf2615830d5534cf (/dev/raw/raw1) [OCR_VOTE]
2. ONLINE 100a31a3e78a4f81bf4013a1a27c8fce (/dev/raw/raw2) [OCR_VOTE]
3. ONLINE 0978acb212554f5ebf5efab28cc6c6a6 (/dev/raw/raw3) [OCR_VOTE]
Located 3 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'tim1'
CRS-2677: Stop of 'ora.crsd' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'tim1'
CRS-2677: Stop of 'ora.asm' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'tim1'
CRS-2677: Stop of 'ora.ctssd' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'tim1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'tim1'
CRS-2677: Stop of 'ora.cssd' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'tim1'
CRS-2677: Stop of 'ora.gpnpd' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'tim1'
CRS-2677: Stop of 'ora.gipcd' on 'tim1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'tim1'
CRS-2677: Stop of 'ora.mdnsd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'tim1'
CRS-2676: Start of 'ora.mdnsd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'tim1'
CRS-2676: Start of 'ora.gipcd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'tim1'
CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1'
CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'tim1'
CRS-2672: Attempting to start 'ora.diskmon' on 'tim1'
CRS-2676: Start of 'ora.diskmon' on 'tim1' succeeded
CRS-2676: Start of 'ora.cssd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'tim1'
CRS-2676: Start of 'ora.ctssd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'tim1'
CRS-2676: Start of 'ora.asm' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'tim1'
CRS-2676: Start of 'ora.crsd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'tim1'
CRS-2676: Start of 'ora.evmd' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'tim1'
CRS-2676: Start of 'ora.asm' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.OCR_VOTE.dg' on 'tim1'
CRS-2676: Start of 'ora.OCR_VOTE.dg' on 'tim1' succeeded
CRS-2672: Attempting to start 'ora.registry.acfs' on 'tim1'
CRS-2676: Start of 'ora.registry.acfs' on 'tim1' succeeded
tim1 2015/11/13 00:09:21 /u01/11.2.0/grid/cdata/tim1/backup_20151113_000921.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 4095 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

Node2 执行第二个脚本(root用户)

[root@tim2 ~]# /u01/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2015-11-13 00:15:30: Parsing the host name
2015-11-13 00:15:30: Checking for super user privileges
2015-11-13 00:15:30: User has super user privileges
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on Node tim1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'tim2'
CRS-2676: Start of 'ora.mdnsd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'tim2'
CRS-2676: Start of 'ora.gipcd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'tim2'
CRS-2676: Start of 'ora.gpnpd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim2'
CRS-2676: Start of 'ora.cssdmonitor' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'tim2'
CRS-2672: Attempting to start 'ora.diskmon' on 'tim2'
CRS-2676: Start of 'ora.diskmon' on 'tim2' succeeded
CRS-2676: Start of 'ora.cssd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'tim2'
CRS-2676: Start of 'ora.ctssd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'tim2'
CRS-2676: Start of 'ora.drivers.acfs' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'tim2'
CRS-2676: Start of 'ora.asm' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'tim2'
CRS-2676: Start of 'ora.crsd' on 'tim2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'tim2'
CRS-2676: Start of 'ora.evmd' on 'tim2' succeeded
tim2 2015/11/13 00:20:09 /u01/11.2.0/grid/cdata/tim2/backup_20151113_002009.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 4095 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

[root@tim2 /]#

最后一步,点击Close,结束图形安装。

4)添加全局环境变量

目的是让root用户能找到Grid用户路径下的可执行文件。

Node1:

[root@tim1 ~]# vi /etc/profile
添加:export PATH=$PATH:/u01/11.2.0/grid/bin
[root@tim1 ~]# source /etc/profile

Node2:同上

两个节点分别自动启动CRS。

一共有四个OFFLINE,这是正常的。

至此,grid全部安装完成。



the end !!!

@jackman 共筑美好!

相关推荐

Linux在线安装JDK1.8

首先在服务器pingwww.baidu.com查看是否可以连网然后就可以在线下载一、下载安装JDK1.81、在下载安装的同时做好一些准备工作...

Linux安装JDK,超详细

1、了解RPMRPM是Red-HatPackageManager(RPM软件包管理器)的缩写,这一文件格式名称虽然打上了RedHat的标志,但是其原始设计理念是开放式的,现在包括OpenLinux...

Linux安装jdk1.8(超级详细)

前言最近刚购买了一台阿里云的服务器准备要搭建一个网站,正好将网站的一个完整搭建过程分享给大家!#一、下载jdk1.8首先我们需要去下载linux版本的jdk1.8安装包,我们有两种方式去下载安装...

Linux系统安装JDK教程

下载jdk-8u151-linux-x64.tar.gz下载地址:https://www.oracle.com/technetwork/java/javase/downloads/index.ht...

干货|JDK下载安装与环境变量配置图文教程「超详细」

1.JDK介绍1.1什么是JDK?SUN公司提供了一套Java开发环境,简称JDK(JavaDevelopmentKit),它是整个Java的核心,其中包括Java编译器、Java运行工具、Jav...

Linux下安装jdk1.8

一、安装环境操作系统:CentOSLinuxrelease7.6.1810(Core)JDK版本:1.8二、安装步骤1.下载安装包...

Linux上安装JDK

以CentOS为例。检查是否已安装过jdk。yumlist--installed|grepjdk或者...

Linux系统的一些常用目录以及介绍

根目录(/):“/”目录也称为根目录,位于Linux文件系统目录结构的顶层。在很多系统中,“/”目录是系统中的唯一分区。如果还有其他分区,必须挂载到“/”目录下某个位置。整个目录结构呈树形结构,因此也...

Linux系统目录结构

一、系统目录结构几乎所有的计算机操作系统都是使用目录结构组织文件。具体来说就是在一个目录中存放子目录和文件,而在子目录中又会进一步存放子目录和文件,以此类推形成一个树状的文件结构,由于其结构很像一棵树...

Linux文件查找

在Linux下通常find不很常用的,因为速度慢(find是直接查找硬盘),通常我们都是先使用whereis或者是locate来检查,如果真的找不到了,才以find来搜寻。为什么...

嵌入式linux基本操作之查找文件

对于很多初学者来说都习惯用windows操作系统,对于这个系统来说查找一个文件简直不在话下。而学习嵌入式开发行业之后,发现所用到的是嵌入式Linux操作系统,本想着跟windows类似,结果在操作的时...

linux系统查看软件安装目录的方法

linux系统下怎么查看软件安装的目录?方法1:whereis软件名以查询nginx为例子...

Linux下如何对目录中的文件进行统计

统计目录中的文件数量...

Linux常见文件目录管理命令

touch用于创建空白文件touch文件名称mkdir用于创建空白目录还可以通过参数-p创建递归的目录...

Linux常用查找文件方法总结

一、前言Linux系统提供了多种查找文件的命令,而且每种查找命令都具有其独特的优势,下面详细总结一下常用的几个Linux查找命令。二、which命令查找类型:二进制文件;...

取消回复欢迎 发表评论: