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

ORACLE11G RACFOR LINUX(oracle11g安装包下载地址大全)

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

XX数据库


目录

目录 2

文档控制 5

修改记录 5

审阅记录 5

一、概述 5

二、安装前设计 5

三、网络规划 6

四、GI 配置注意事项 7

五、参数设置 7

5.1 创建用户和组 7

5.2 配置/etc/hosts 8

5.3 配置内核参数 8

5.4 修改/etc/pam.d/login 9

5.5 修改/etc/profile 9

5.6 修改 /etc/nsswitch.conf 10

5.7 修改/etc/security/limits.conf 10

5.8 修改/etc/security/limits.d/20-nproc.conf 11

5.9 关闭透明大页 11

5.10 安装所需软件包 11

5.11 创建软件安装目录 13

5.12 修改用户环境变量 13

5.13 关闭防火墙 13

5.14 修改selinux 14

5.15 安装vnc软件包—可选 14

5.16 上传安装界质并解压 14

5.17 安装cvu软件包 14

5.18 检查时钟同步 15

六、多路径聚合及配置共享存储 15

6.1 多路径软件安装及多路径聚合 15

6.2 udev绑定共享存储 15

七、安装GRID软件 16

7.1 打开Xmanager - Passive 16

7.2grid用户 16

export DISPLAY= 192.168.6.120:0.0 16

7.3 开始安装GRID 16

7.4 执行第一个脚本 25

7.5 执行第二个脚本 26

7.6 后续安装步骤 29

7.7 查看集群状态 31

7.8 使用ASMCA创建磁盘组 32

八、安装数据库软件 33

8.1 运行./runInstaller 33

8.2 执行脚本 40

九、安装PSU补丁 41

9.1更新opatch程序 41

9.3 开始更新PSU补丁 41

9.4 检查集群状态 43

9.4 oracle补丁更新 44

十、 DBCA建库 44

十一、 ADG检查 54

文档控制

此文档仅供<XX>客户与XX数据支持服务部审阅,不得向与此无关的个人或机构传阅或复制。

修改记录

日期

作者

版本

修改记录





20230223

屈九州

1.0

创建初始版本

审阅记录

姓名

职位







一、概述

本文适用于<XX>客户及XX数据技术股份有限公司的提供数据库服务—ORACLE 11G RAC集群实施部署。

二、安装前设计

  1. 为简化系统的复杂度和与第三方软件之间的交互,Oracle 建议避免使用第三方集群管理软件,除非实在需要
  2. 推荐将 Automatic Storage Management (ASM) 用于数据库存储。
  3. 确认节点数、OS 版本、grid组件 版本、rdbms组件 版本、网络结构和补丁是否经过认证
  4. 消除架构中的所有单一故障点。示例包括(但不限于):集群私网冗余(NIC 绑定等)、存储的多路存取路径、使用 2 个或多个 HBA 或发起程序和多路径软件、磁盘镜像/RAID10

三、网络规划

  1. 对于私网,强烈推荐使用万兆以太网,至少需要使用千兆以太网。(如果没有单独交换机,则在公网交换机划出VLAN给私网使用或与系统工程师确认该IP是否已经被HA使用或ping该IP,查看是否ping通)
  2. 在主机名或域名中不使用下划线。这条规则也适用于 Net(网络)、Host(主机)、Gateway(网关)或 Domain(域)名。(数字和可以包含中划线但不能放前面) (主机名不超过63个字符,建议8位);
  3. VIP 和 SCAN VIP 应与公网在同一个子网上。
  4. 默认网关必须与 VIP(包括 SCAN VIP)在同一个子网上,以防止出现 VIP 启动/停止/故障转移问题。
  5. 为避免名称解析出现问题,请确保 HOSTS 文件和 DNS 中提供了 VIP 与公共主机名。
  6. 网络接口必须在所有节点上使用相同的名称(如 eth1 -> eth1 支持 VIP,eth2 -> eth2 支持专用私网网络)。
  7. 为避免公网或私网出现单一故障点,Oracle 强烈建议在每个集群节点上配置公共网络接口卡 (Network Interface Card, NIC)和私网 NIC 的冗余集。
  8. 私网连接需要使用交换机,或冗余交换机(不支持交叉线直连)强烈建议为私网使用专用冗余交换机
  9. 公用IP地址 5个、私有网络地址4个
  10. public-ip 2个 公网IP
  11. vip-ip 2个公网IP (不需要实际将该ip配置到主机网卡)
  12. 私有网络2个ip
  13. scan-ip 1个公网IP(不需要实际将该ip配置到主机网卡)

四、GI 配置注意事项

  1. 在 Grid Infrastructure 11gR2 中,已弃用 裸设备和块设备,建议使用 ASM 存储 OCR 和Voting Disks。

五、参数设置

5.1 创建用户和组

从11g R2开始 Oracle官方推荐集群管理软件和数据库软件分别创建不同的用户来安装,且每个节点的UID和GID必须相同,UID和GID该值可以随便取,但各个节点之间必须相同

AS ROOT:

groupadd -g 1100 oinstall

groupadd -g 1200 dba

groupadd -g 1300 oper

groupadd -g 1400 asmadmin

groupadd -g 1500 asmdba

groupadd -g 1600 asmoper

useradd -u 1100 -g oinstall -G dba,oper,asmdba,asmadmin oracle

useradd -u 1200 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

设置密码

passwd oracle

passwd grid

5.2 配置/etc/hosts

注意:private、vip及scanip对应的主机名不能有下划线

AS ROOT

vi /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

#public

#private

#vip

#scanip

5.3 配置内核参数

修改/etc/sysctl.conf文件,在未尾处添加如下内容,注意 kernel.shmall该参数的设置,kernel.shmall 参数是控制共享内存页数 。Linux 共享内存页大小为4KB,,如果你的操作系统内存为128G, 那么需要共享内存页数是 137438953472/4096=33554432 (页), kernel.shmmax该参数的设置根据你给oracle数据库的SGA参数来调整,Oracle官方建议是给物理内存的一半。

AS ROOT:

#vi /etc/sysctl.conf

fs.aio-max-nr = 4194304

fs.file-max = 6815744

kernel.shmall = 47185920 (根据shmmax来计算次值/4096)

kernel.shmmax = 193273528320 (以字节为单位,物理内存数量(MB为单位)*0.75*1024*1024,为内存的0.7倍)

kernel.shmmni = 4096

kernel.sem = 1024 60000 1024 256

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 2097152

vm.nr_hugepages = 10240 (大页内存(m)/2)

vm.min_free_kbytes = 2631926

注:优化了大页大小(大页的内存要大于SGA大小才能被Oracle使用vm.nr_hugepages=71680,大页为140g)

[root@tz1 rules.d]# grep Huge /proc/meminfo(查看大页的使用)

AnonHugePages: 0 kB

HugePages_Total: 10240

HugePages_Free: 17961

HugePages_Rsvd: 7727

HugePages_Surp: 0

Hugepagesize: 2048 kB

使之生效:

sysctl -p

5.4 修改/etc/pam.d/login

AS ROOT:(添加参数)

#vi /etc/pam.d/login

session required pam_limits.so

session required /lib64/security/pam_limits.so

5.5 修改/etc/profile

AS ROOT:(添加参数)

#vi /etc/profile

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

5.6 修改 /etc/nsswitch.conf

AS ROOT: (添加参数)

vi /etc/nsswitch.conf

hosts: files nis dns

5.7 修改/etc/security/limits.conf

Soft、 hard值一样

AS ROOT:

grid soft core 0

grid hard core 0

grid soft nproc 400000

grid hard nproc 400000

grid soft nofile 400000

grid hard nofile 400000

grid soft memlock 355034520

grid hard memlock 355034520

oracle soft core 0

oracle hard core 0

oracle soft nproc 400000

oracle hard nproc 400000

oracle soft nofile 400000

oracle hard nofile 400000

oracle soft memlock unlimited

oracle hard memlock unlimited

oracle soft stack 10240

* soft memlock 32768

* hard memlock 32768

5.8 修改/etc/security/limits.d/20-nproc.conf

将 * soft nproc 1024 改为 16384

AS ROOT:

vi /etc/security/limits.d/90-nproc.conf

# Default limit for number of user's processes to prevent

# accidental fork bombs.

# See rhbz #432903 for reasoning.

* soft nproc 16384

root soft nproc unlimited

5.9 关闭透明大页

[root@myzdb1 ~]# grep AnonHugePages /proc/meminfo

AnonHugePages: 12288 kB

#这里 >0KB 表示启用透明大页,需要关闭;

(1)echo 'GRUB_CMDLINE_LINUX="transparent_hugepage=never"' >> /etc/default/grub

(2)grub2-mkconfig -o /boot/grub2/grub.cfg

grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

(3) 重启操作系统

[root@myzdb1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled

[always] madvise never

#表示已启用

[root@myzdb1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]

#[never]表示已经禁用

5.10 安装所需软件包

AS ROOT:

使用下面的命令检查软件包是否已安装

[root@db01 ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils smartmontools sysstat gcc elfutils-libelf-devel gcc-c++ glibc-headers mpfr

安装软件包

[root@db01 ~]# yum -y install binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils smartmontools sysstat gcc elfutils-libelf-devel gcc-c++ glibc-headers mpfr

根据oracle官方文档要求,在rhel6上还需安装些32位包,在此也将这些32位包安装上

[root@db01 ~]# yum -y install compat-libstdc++-33-3.2.3-69.el6.i686 glibc-2.12-1.107.el6.i686 libaio-devel.i686 libstdc++-devel.i686 glibc-devel.i686 glibc-devel-2.12-1.107.el6.i686 libaio-0.3.107-10.el6.i686 libX11-1.5.0-4.el6.i686 libXau-1.0.6-4.el6.i686 libXi-1.6.1-3.el6.i686 libXtst-1.2.1-2.el6.i686 libgcc-4.4.7-3.el6.i686 libstdc++-4.4.7-3.el6.i686 libstdc++-devel-4.4.7-3.el6.i686 libxcb-1.8.1-1.el6.i686 unixODBC-2.2.14-12.el6_3* unixODBC-2.2.14-12.el6_3.i686 unixODBC-devel-2.2.14-12.el6_3.x86_64 unixODBC-devel-2.2.14-12.el6_3.i686

5.11 创建软件安装目录

AS ROOT:

mkdir -p /u01/app/oracle/product/11.2.0/db_1

mkdir -p /u01/app/grid

mkdir -p /u01/app/11.2.0/grid

chown -R grid:oinstall /u01

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01

5.12 修改用户环境变量

AS ORACLE:

vi .bash_profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_SID=tzdb1 #此值可以根据实际SID设置

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'

AS GRID:

vi .bash_profile

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

export ORACLE_SID=+ASM1

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

5.13 关闭防火墙

AS ROOT:

#For Rhel Linux 7的防火墙需要按如下方法关闭,

systemctl status firewalld

systemctl stop firewalld

systemctl disable firewalld

5.14 修改selinux

AS ROOT:

vi /etc/selinux/config

SELINUX=disabled

5.15 安装vnc软件包—可选

AS ROOT:

yum install tigervnc*

5.16 上传安装界质并解压

p13390677_112040_Linux-x86-64_1of7.zip

p13390677_112040_Linux-x86-64_2of7.zip

p13390677_112040_Linux-x86-64_3of7.zip

# su - grid

$ cd /u01/soft/

$ unzip p13390677_112040_Linux-x86-64_3of7.zip

解压rdbms组件介质包

# su – oracle

$ cd /u01/soft/

$ unzip p13390677_112040_Linux-x86-64_1of7.zip

Unzip p13390677_112040_Linux-x86-64_2of7.zip

5.17 安装cvu软件包

以root用户在所有节点中安装此软件包,将该包scp到第二节点即可

AS ROOT:

cd /u01/soft/grid/rpm

ls

cvuqdisk-1.0.9-1.rpm

rpm -ivh cvuqdisk-1.0.9-1.rpm

5.18 检查时钟同步

需要检查两台服务器是否配置了时间同步,及时间是否存在差异;

如果没有ntp 服务器环境,可停止本机的NTP服务并启用rac集群自带的ctts时钟同步服务

如果整个环境中没有配置ntp同步服务器,可以使用11GR2自带的CTTS同步服务进程,可以将OS自带的禁用

systemctl stop chronyd.service

mv /etc/chrony.conf chrony.conf.bak

[root@tzdb1 ~]# mv /etc/ntp.conf /etc/ntp.confbak

六、多路径聚合及配置共享存储

6.1 多路径软件安装及多路径聚合

本部分由系统工程师完成:需要与系统工程师确认节点之间磁盘顺序是否一致。

6.2 udev绑定共享存储

# 配置共享存储建议使用UDEV来绑定,不要使用asmlib来配置共享存储

Vi 99-oracle-asmdevices.rules

ENV{DM_NAME}=="ocr*",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"

ENV{DM_NAME}=="data*",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"

#udevadm control --reload-rules

#udevadm trigger #

上面命令执行成功之后,进入到/dev/目录下,确认是否有绑定磁盘成功

# cd /dev/

# ll dm*

[root@tz1 rules.d]# ll /dev/dm*

brw-rw----. 1 root disk 253, 0 Nov 4 10:31 /dev/dm-0

brw-rw----. 1 root disk 253, 1 Nov 4 10:31 /dev/dm-1

brw-rw----. 1 root disk 253, 2 Nov 4 10:31 /dev/dm-2

brw-rw----. 1 root disk 253, 3 Nov 4 10:31 /dev/dm-3

brw-rw----. 1 grid asmadmin 253, 4 Nov 4 10:38 /dev/dm-4

brw-rw----. 1 grid asmadmin 253, 5 Nov 4 10:38 /dev/dm-5

brw-rw----. 1 grid asmadmin 253, 6 Nov 4 10:38 /dev/dm-6

brw-rw----. 1 grid asmadmin 253, 7 Nov 4 10:38 /dev/dm-7

brw-rw----. 1 grid asmadmin 253, 8 Nov 4 10:38 /dev/dm-8

七、安装GRID软件

7.1 打开Xmanager - Passive

7.2grid用户

export DISPLAY= 192.168.6.120:0.0

7.3 开始安装GRID

选择高级安装模式

选择安装语言

输入clustername和scan name,cluster name可以自定义,scan name必须对应/etc/hosts文件中scanip对应的名称

添加/etc/hosts文件中public ip和Vip对应的主机名称和vip主机名称

确认public和private网络的子网网段,2节点的网卡号必须相对应

选择ASM存储方式存储数据

创建OCR磁盘组,输入磁盘组名称,该名称可自定义,采用normal模式,选择所需的磁盘

输入ASM实例密码,暂设为oracle

选择Do not use intelligent

该步骤是检查系统环境是否能过软件安装条件

pdksh软件包可以不安装,Device Checks for ASM是报没有使用asmlib,我们采用的是start_udev,Task resolv.conf是scanip没配DNS,采用的是/etc/hosts文件,这3项可以忽略。

点击“Install”开始安装

安装到最后会弹出一个对话框,提示你以root用户分别在节点中执行以下脚本,注意第2个脚本必须不能同时执行,必须第一节点执行成功之后,再在节点2上执行。

7.4 执行第一个脚本

节点一执行脚本一

[root@tz1 ~]# /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.

节点二执行脚本一

[root@tz2 ~]# /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.

7.5 执行第二个脚本

节点一先执行第二个脚本

跑root跑脚本报错需要配置一下ohasd进程(两节点都需要)

(1) 解决方法:

在RHEL 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。

以root用户创建服务文件

#touch /usr/lib/systemd/system/ohas.service

#chmod 777 /usr/lib/systemd/system/ohas.service

(2) 将以下内容添加到新创建的ohas.service文件中

#vim /usr/lib/systemd/system/ohas.service

[Unit]

Description=Oracle High Availability Services

After=syslog.target

[Service]

ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple

Restart=always

[Install]

WantedBy=multi-user.target

(3)以root用户运行下面的命令

#systemctl daemon-reload

#systemctl enable ohas.service

#systemctl start ohas.service

(4)查看运行状态

#systemctl status ohas.service

# /u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

User ignored Prerequisites during installation

Installing Trace File Analyzer

CRS-2672: Attempting to start 'ora.mdnsd' on 'tz1'

CRS-2676: Start of 'ora.mdnsd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'tz1'

CRS-2676: Start of 'ora.gpnpd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tz1'

CRS-2672: Attempting to start 'ora.gipcd' on 'tz1'

CRS-2676: Start of 'ora.cssdmonitor' on 'tz1' succeeded

CRS-2676: Start of 'ora.gipcd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'tz1'

CRS-2672: Attempting to start 'ora.diskmon' on 'tz1'

CRS-2676: Start of 'ora.diskmon' on 'tz1' succeeded

CRS-2676: Start of 'ora.cssd' on 'tz1' succeeded

ASM created and started successfully.

Disk Group OCR created successfully.

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4256: Updating the profile

Successful addition of voting disk 0933fa1504be4ff9bfc5e6b3cd1c4390.

Successful addition of voting disk 262c00c837654fc8bf1da518b4140559.

Successful addition of voting disk 02d45a5873a14fe1bfd4b04c41191193.

Successfully replaced voting disk group with +OCR.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

## STATE File Universal Id File Name Disk group

-- ----- ----------------- --------- ---------

1. ONLINE 0933fa1504be4ff9bfc5e6b3cd1c4390 (/dev/mapper/ocr03) [OCR]

2. ONLINE 262c00c837654fc8bf1da518b4140559 (/dev/mapper/ocr02) [OCR]

3. ONLINE 02d45a5873a14fe1bfd4b04c41191193 (/dev/mapper/ocr01) [OCR]

Located 3 voting disk(s).

CRS-2672: Attempting to start 'ora.asm' on 'tz1'

CRS-2676: Start of 'ora.asm' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.OCR.dg' on 'tz1'

CRS-2676: Start of 'ora.OCR.dg' on 'tz1' succeeded

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

节点一执行完毕后,节点二再执行第二个脚本

# /u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

User ignored Prerequisites during installation

Installing Trace File Analyzer

CRS-2672: Attempting to start 'ora.mdnsd' on 'tz1'

CRS-2676: Start of 'ora.mdnsd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'tz1'

CRS-2676: Start of 'ora.gpnpd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tz1'

CRS-2672: Attempting to start 'ora.gipcd' on 'tz1'

CRS-2676: Start of 'ora.cssdmonitor' on 'tz1' succeeded

CRS-2676: Start of 'ora.gipcd' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'tz1'

CRS-2672: Attempting to start 'ora.diskmon' on 'tz1'

CRS-2676: Start of 'ora.diskmon' on 'tz1' succeeded

CRS-2676: Start of 'ora.cssd' on 'tz1' succeeded

ASM created and started successfully.

Disk Group OCR created successfully.

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4256: Updating the profile

Successful addition of voting disk 0933fa1504be4ff9bfc5e6b3cd1c4390.

Successful addition of voting disk 262c00c837654fc8bf1da518b4140559.

Successful addition of voting disk 02d45a5873a14fe1bfd4b04c41191193.

Successfully replaced voting disk group with +OCR.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

## STATE File Universal Id File Name Disk group

-- ----- ----------------- --------- ---------

1. ONLINE 0933fa1504be4ff9bfc5e6b3cd1c4390 (/dev/mapper/ocr03) [OCR]

2. ONLINE 262c00c837654fc8bf1da518b4140559 (/dev/mapper/ocr02) [OCR]

3. ONLINE 02d45a5873a14fe1bfd4b04c41191193 (/dev/mapper/ocr01) [OCR]

Located 3 voting disk(s).

CRS-2672: Attempting to start 'ora.asm' on 'tz1'

CRS-2676: Start of 'ora.asm' on 'tz1' succeeded

CRS-2672: Attempting to start 'ora.OCR.dg' on 'tz1'

CRS-2676: Start of 'ora.OCR.dg' on 'tz1' succeeded

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

7.6 后续安装步骤

上面的脚本在所有节点执行成功之后,回到之前的图形界面,点击”OK”按钮,继续安装

安装到最后一步会报验证集群失败,此报错可以忽略,原因是我们没有使用dns配置scanip

7.7 查看集群状态

查看集群状态

[root@ tz1~]# /u01/app/11.2.0/grid/bin/crsctl stat res -t

--------------------------------------------------------------------------------

NAME TARGET STATE SERVER STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.LISTENER.lsnr

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.OCR.dg

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.asm

ONLINE ONLINE tz1 Started

ONLINE ONLINE tz2 Started

ora.gsd

OFFLINE OFFLINE tz1

OFFLINE OFFLINE tz2

ora.net1.network

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.ons

ONLINE ONLINE tz1

ONLINE ONLINE tz2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE tz1

ora.tz1.vip

1 ONLINE ONLINE tz1

ora.tz2.vip

1 ONLINE ONLINE tz2

ora.cvu

1 ONLINE ONLINE tz1

ora.oc4j

1 ONLINE ONLINE tz1

ora.scan1.vip

1 ONLINE ONLINE tz1


7.8 使用ASMCA创建磁盘组

切换至GRID用户进行创建

[grid@tz1~]$ asmca

创建名称为DATA,冗余模式为NOrmal

从上图中已经可以看出DATA磁盘组已经在所有节点中mount上了,如果需要创建其它磁盘组,可根据以上操作步骤进行。

八、安装数据库软件

8.1 运行./runInstaller

第一节点以oracle开启vnc,进入到/u01/soft/database目录下运行runInstaller

解决办法:

修改$ORACLE_HOME/sysman/lib/ins_emagent.mk,将

$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11

进入vi编辑器后 命令模式输入/NMECTL 进行查找,快速定位要修改的行

在后面追加参数-lnnz11 第一个是字母l 后面两个是数字1

保存退出后Retry

8.2 执行脚本

以root用户分别在节点1和节点2,运行上面提示的脚本

# /u01/app/oracle/product/11.2.0/db_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@tz1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

九、安装PSU补丁

9.1更新opatch程序

9.3 开始更新PSU补丁

9.3.1 节点1

[root OPatch]# ./opatch auto /u01/soft/28429134 -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/soft -patchn 28429134 -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2021-04-23_15-08-25.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2021-04-23_15-08-25.report.log

2021-04-23 15:08:25: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...

Stopped CRS successfully

patch /u01/soft/28429134/27735020 apply successful for home /u01/app/11.2.0/grid

patch /u01/soft/28429134/28204707 apply successful for home /u01/app/11.2.0/grid

patch /u01/soft/28429134/28204939 apply successful for home /u01/app/11.2.0/grid

Starting CRS...

Installing Trace File Analyzer

CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

[root@tz1 OPatch]#

9.3.2 节点2

[root@ grid]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/soft/28429134/ -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/soft -patchn 28429134 -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2021-04-23_15-19-27.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2021-04-23_15-19-27.report.log

2021-04-23 15:19:27: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...

Stopped CRS successfully

patch /u01/soft/28429134/27735020 apply successful for home /u01/app/11.2.0/grid

patch /u01/soft/28429134/28204707 apply successful for home /u01/app/11.2.0/grid

patch /u01/soft/28429134/28204939 apply successful for home /u01/app/11.2.0/grid

Starting CRS...

Installing Trace File Analyzer

CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

[root@tz2 grid]#

9.4 检查集群状态

打完PSU之后,检查集群健康状态

[root@tz2 ~]# /u01/app/11.2.0/grid/bin/crsctl stat res -t

--------------------------------------------------------------------------------

NAME TARGET STATE SERVER STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.LISTENER.lsnr

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.OCR.dg

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.asm

ONLINE ONLINE tz1 Started

ONLINE ONLINE tz2 Started

ora.gsd

OFFLINE OFFLINE tz1

OFFLINE OFFLINE tz2

ora.net1.network

ONLINE ONLINE tz1

ONLINE ONLINE tz2

ora.ons

ONLINE ONLINE tz1

ONLINE ONLINE tz2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE tz1

ora.tz1.vip

1 ONLINE ONLINE tz1

ora.tz2.vip

1 ONLINE ONLINE tz2

ora.cvu

1 ONLINE ONLINE tz1

ora.oc4j

1 ONLINE ONLINE tz1

ora.scan1.vip

1 ONLINE ONLINE tz1

[root@tz2 ~]#


9.4 oracle补丁更新

/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch napply -oh /u01/app/oracle/product/11.2.0/db_1 -local /u01/soft/28429134/27735020/custom/server

/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0/db_1 -local /u01/soft/28429134/28204707

十、 DBCA建库

在第一节点中以oracle用户登录系统,

选择一般事务方式建库


输入数据库实例名称,并选中所有的节点

去掉EM选项,不选择安装EM

密码暂时设为oracle

使用ASM存储方式存储数据,并选择刚创建的+DATA的磁盘组

关闭specify fast recovery Area;

启用归档,并指定归档路径;

内存分配,不使用MMA,选择Custom,自定义分配

内存分配原则如下:

1.操作系统空闲20%:

20%*X=S;

2.process=Y,

占用内存Y*20M=P;

3.操作系统占用5GB左右=C;

4.SGA=X-0.2*X-Y*20M-5

5.PGA=(X-0.2*X-Y*20M-5G)*30%

6.*.share_pool sga*0.1

7.*.buffer_cache sga*0.2

修改用户连接数

选择数据库字符集,

选择数据库连接模式,

设置redo大小为500m,每个节点6组

十一、 ADG检查

相关推荐

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命令查找类型:二进制文件;...

取消回复欢迎 发表评论: