IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 大数据 -> CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境 -> 正文阅读

[大数据]CentOS7 安装 Oracle 11g rac(1) —— 配置安装环境

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

一、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<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  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<link>
        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<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  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<link>
        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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        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<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  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<link>
        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<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  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<link>
        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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  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<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        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.
  大数据 最新文章
实现Kafka至少消费一次
亚马逊云科技:还在苦于ETL?Zero ETL的时代
初探MapReduce
【SpringBoot框架篇】32.基于注解+redis实现
Elasticsearch:如何减少 Elasticsearch 集
Go redis操作
Redis面试题
专题五 Redis高并发场景
基于GBase8s和Calcite的多数据源查询
Redis——底层数据结构原理
上一篇文章      下一篇文章      查看所有文章
加:2022-06-18 23:28:02  更:2022-06-18 23:29:46 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/23 16:53:21-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码