zoukankan      html  css  js  c++  java
  • 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 ~]# 
  • 相关阅读:
    dfadfas
    Sqlserver修改文件目录,包括系统数据库
    VS2013 产品密钥所有版本
    win11 取消右键更多选项
    VS2013 产品密钥所有版本
    CronTrigger表达式
    C#语言Windows服务程序测试网站发送HTTP请求超时解决办法
    未能写入输出文件“c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\705b2e0e\c6ba7a68\App_global.asax.v9
    SQL跨数据库复制表数据<转载>
    “服务器应用程序不可用”解决方法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315885.html
Copyright © 2011-2022 走看看