栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境

CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境

目录
  • CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境
    • 一、Oracle 11g rac 安装规划
    • 二、查看操作系统版本与网卡配置
        • 1、查看操作系统版本
        • 2、查看网卡配置
    • 三、修改主机名
        • 1、临时修改主机名
        • 2、永久修改主机名
    • 四、关闭防火墙和 selinux(两个节点同时操作)
        • 1、关闭防火墙
        • 2、关闭 selinux
    • 五、修改主机的 shell 限制(两个节点同时操作)
    • 六、修改主机的内核参数(两个节点同时操作)
    • 七、修改 /etc/pam.d/login(两个节点同时操作)
    • 八、禁用 NTP 服务(两个节点同时操作)

一、Oracle 11g rac 安装规划

在虚拟机环境中安装包含两个节点的 Oracle 11g rac 集群,节点名称分别为 rac1 和 rac2,每台虚拟机使用一块本地磁盘(容量 20GB)和一块共享磁盘(容量 30GB)。具体配置如下:

(1)虚拟机:VMware Workstation12;

(2)操作系统:CentOS7.3、64位系统;

(3)IP 地址:

主机名网卡IP地址子网掩码网关DNS
节点1(rac1)
bond1(Public IP)192.168.1.10124192.168.1.1192.168.1.1
bond2(Private IP)10.1.1.10124
节点2(rac2)
bond1(Public IP)192.168.1.10224192.168.1.1192.168.1.1
bond2(Private IP)10.1.1.10224
Virtual IP(VIP)192.168.1.201
192.168.1.202
192.168.1.203

说明:每台服务器配置 4 块网卡,分别为 ens33、ens34、ens35、ens39,其中 ens33 和 ens34 绑定为 bond1,ens35 和 ens39 绑定为 bond2。

二、查看操作系统版本与网卡配置 1、查看操作系统版本
# 节点1
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

# 节点2
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
2、查看网卡配置
# 节点1
[root@localhost ~]# ifconfig
bond1: flags=5187  mtu 1500
        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20c:29ff:fec5:d46a  prefixlen 64  scopeid 0x20
        ether 00:0c:29:c5:d4:6a  txqueuelen 1000  (Ethernet)
        RX packets 1088  bytes 185601 (181.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 442  bytes 48040 (46.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond2: flags=5187  mtu 1500
        inet 10.1.1.101  netmask 255.255.255.0  broadcast 10.1.1.255
        inet6 fe80::20c:29ff:fec5:d47e  prefixlen 64  scopeid 0x20
        ether 00:0c:29:c5:d4:7e  txqueuelen 1000  (Ethernet)
        RX packets 957  bytes 1326060 (1.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 1094 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33: flags=6211  mtu 1500
        ether 00:0c:29:c5:d4:6a  txqueuelen 1000  (Ethernet)
        RX packets 762  bytes 111440 (108.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 442  bytes 48040 (46.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens34: flags=6211  mtu 1500
        ether 00:0c:29:c5:d4:6a  txqueuelen 1000  (Ethernet)
        RX packets 326  bytes 74161 (72.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens35: flags=6211  mtu 1500
        ether 00:0c:29:c5:d4:7e  txqueuelen 1000  (Ethernet)
        RX packets 475  bytes 662807 (647.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 1094 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens39: flags=6211  mtu 1500
        ether 00:0c:29:c5:d4:7e  txqueuelen 1000  (Ethernet)
        RX packets 482  bytes 663253 (647.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1  (Local Loopback)
        RX packets 64  bytes 5568 (5.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 5568 (5.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

# 节点2
[root@localhost ~]# ifconfig
bond1: flags=5187  mtu 1500
        inet 192.168.1.102  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20c:29ff:fe88:a653  prefixlen 64  scopeid 0x20
        ether 00:0c:29:88:a6:53  txqueuelen 1000  (Ethernet)
        RX packets 944  bytes 167727 (163.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 391  bytes 38046 (37.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond2: flags=5187  mtu 1500
        inet 10.1.1.102  netmask 255.255.255.0  broadcast 10.1.1.255
        inet6 fe80::20c:29ff:fe88:a667  prefixlen 64  scopeid 0x20
        ether 00:0c:29:88:a6:67  txqueuelen 1000  (Ethernet)
        RX packets 925  bytes 1298492 (1.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 1094 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33: flags=6211  mtu 1500
        ether 00:0c:29:88:a6:53  txqueuelen 1000  (Ethernet)
        RX packets 640  bytes 97928 (95.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 391  bytes 38046 (37.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens34: flags=6211  mtu 1500
        ether 00:0c:29:88:a6:53  txqueuelen 1000  (Ethernet)
        RX packets 304  bytes 69799 (68.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens35: flags=6211  mtu 1500
        ether 00:0c:29:88:a6:67  txqueuelen 1000  (Ethernet)
        RX packets 459  bytes 649023 (633.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 1094 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens39: flags=6211  mtu 1500
        ether 00:0c:29:88:a6:67  txqueuelen 1000  (Ethernet)
        RX packets 466  bytes 649469 (634.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
三、修改主机名 1、临时修改主机名
# 节点1
[root@localhost ~]# hostname rac1

# 节点2
[root@localhost ~]# hostname rac2
2、永久修改主机名
# 节点1
vi /etc/hostname
rac1

# 节点2
vi /etc/hostname
rac2
四、关闭防火墙和 selinux(两个节点同时操作) 1、关闭防火墙
# 节点1
[root@rac1 ~]# systemctl stop firewalld
[root@rac1 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

# 节点2
[root@rac2 ~]# systemctl stop firewalld
[root@rac2 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
2、关闭 selinux

修改文件 /etc/selinux/config,设置 SELINUX=disabled:

[root@rac2 ~]# vi /etc/selinux/config

# 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 three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@rac2 ~]# setenforce 0
五、修改主机的 shell 限制(两个节点同时操作)

修改 /etc/security/limits.conf 文件,在文件的结尾添加以下内容:

[root@rac2 ~]# vi /etc/security/limits.conf

...............
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4


grid soft nofile 65536
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

# End of file
六、修改主机的内核参数(两个节点同时操作)

修改 /etc/sysctl.conf 文件,在文件的结尾添加以下内容:

[root@rac2 ~]# vi /etc/sysctl.conf

# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

kernel.shmmax = 4294967296
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576

执行以下命令使内核参数生效:

[root@rac1 ~]# /sbin/sysctl -p

kernel.shmmax = 4294967296
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576
七、修改 /etc/pam.d/login(两个节点同时操作)

修改 /etc/pam.d/login 文件,在文件的结尾添加以下内容:

[root@rac1 ~]# vi /etc/pam.d/login

......

session required /lib/security/pam_limits.so
session required pam_limits.so
八、禁用 NTP 服务(两个节点同时操作)
# 节点1
[root@rac1 ~]# systemctl stop ntpd
Failed to stop ntpd.service: Unit ntpd.service not loaded.

# 节点2
[root@rac2 ~]# systemctl stop ntpd
Failed to stop ntpd.service: Unit ntpd.service not loaded.
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/962111.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号