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 ~]# 
  • 相关阅读:
    数据仓库--事实表
    Oracle SQL函数pivot、unpivot转置函数实现行转列、列转行
    在Oracle中使用rank()over()排名的问题
    python 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少? 程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。(用列表推导式)
    pyhton 打印菱形
    三元运算
    Python代码书写规范
    DDT驱动
    使用 JsonPath 完成接口自动化测试中参数关联和数据验证(Python语言)
    数据类型(字典)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315885.html
Copyright © 2011-2022 走看看