• OCM_Session7_1_配置/etc/hosts


    一、配置/etc/hosts
     
    在安装rac第一步是配置/etc/hosts文件,在OCM环境中已经配置好,我们只需要查看:cat /etc/hosts

     
     

    2.7.1 IP Address Requirements

    Before starting the installation, you must have the following IP addresses available for each node:

    • An IP address with an associated network name registered in the domain name service (DNS) for the public interface. If you do not have an available DNS, then record the network name and IP address in the system hosts file, /etc/hosts.

    • One virtual IP (VIP) address with an associated network name registered in DNS. If you do not have an available DNS, then record the network name and VIP address in the system hosts file, /etc/hosts. Select an address for your VIP that meets the following requirements:

      • The IP address and network name are currently unused

      • The VIP is on the same subnet as your public interface

      Before installation, check that the default gateway can be accessed by a ping command. During installation, OUI uses the ping command to ensure that the VIP is reachable. To find the default gateway, use the route command, as described in your operating system's help utility. After installation, configure clients to use either the VIP address, or the network name associated with the VIP. If a node fails, then the node's virtual IP address fails over to another node.

    • A private IP address with a host name for each private interface

      Oracle recommends that you use private network IP addresses for these interfaces (for example: 10.*.*.* or 192.168.*.*). Use the /etc/hosts file on each node to associate private network names with private IP addresses.

    For example, with a two node cluster where each node has one public and one private interface, you might have the configuration shown in the following table for your network interfaces, where the hosts file is /etc/hosts:

    Node Interface Name Type IP Address Registered In
    rac1 rac1 Public 143.46.43.100 DNS (if available, else the hosts file)
    rac1 rac1-vip Virtual 143.46.43.104 DNS (if available, else the hosts file)
    rac1 rac1-priv Private 10.0.0.1 Hosts file
    rac2 rac2 Public 143.46.43.101 DNS (if available, else the hosts file)
    rac2 rac2-vip Virtual 143.46.43.105 DNS (if available, else the hosts file)
    rac2 rac2-priv Private 10.0.0.2 Hosts file

    To enable VIP failover, the configuration shown in the preceding table defines the public and VIP addresses of both nodes on the same subnet, 143.46.43. When a node or interconnect fails, then the associated VIP is relocated to the surviving instance, enabling fast notification of the failure to the clients connecting through that VIP. If the application and client are configured with transparent application failover options, then the client is reconnected to the surviving instance.

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

    我的修改如下:

    rac1节点修改/etc/hosts文件
    ---------------------------------------------------------------------------------------
    [root@rac1 ~]# cp /etc/hosts /etc/hosts.bak
    [root@rac1 ~]# vi /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1       localhost
    ::1             localhost6.localdomain6 localhost6

    #node1
    192.168.1.151   rac1.localdomain       rac1
    192.168.1.152   rac1-vip.localdomain   rac1-vip
    172.168.1.14    rac1-priv.localdomain  rac1-priv


    #node2
    192.168.1.153   rac2.localdomain       rac2
    192.168.1.154   rac2-vip.localdomain   rac2-vip
    172.168.1.15    rac2-priv.localdomain  rac2-priv
    ~
    ~
    ~
    "/etc/hosts" 17L, 482C written
    [root@rac1 ~]# 

    ------------------------------------------------------------------------------------
    rac2节点修改/etc/hosts文件

    [root@rac2 ~]# cp /etc/hosts /etc/hosts.bak
    [root@rac2 ~]# vi /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1       localhost
    ::1             localhost6.localdomain6 localhost6

    #node1
    192.168.1.151   rac1.localdomain       rac1
    192.168.1.152   rac1-vip.localdomain   rac1-vip
    172.168.1.14    rac1-priv.localdomain  rac1-priv


    #node2
    192.168.1.153   rac2.localdomain       rac2
    192.168.1.154   rac2-vip.localdomain   rac2-vip
    172.168.1.15    rac2-priv.localdomain  rac2-priv
    ~
    ~
    ~
    "/etc/hosts" 15L, 480C written
    [root@rac2 ~]# 
  • 相关阅读:
    Fiddler系列教程3:使用Fiddler录制Jmeter性能测试脚本
    PySide6读取EXCLE文档
    C#实现操作DOS命令的方法
    在PyCharm中调用xlrd模块出现 ModuleNotFoundError: No module named 'xlrd' ,但在sublime却可以正常
    pip安装时出现错误:File "D:Python39Scriptspip.exe\__main__.py", line 4, in <module> ModuleNotFoundError: No module named 'pip'
    /ect/fstab与/etc/mtab的区别
    虚拟机中Ubuntu系统修改分辨率
    关于报错Could not load file or assembly的问题
    关于WinCC归档应该知道的事
    vue + element 表单的简单公用组件,表格的集成写法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315885.html
Copyright © 2020-2023  润新知