Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4818666
  • 博文数量: 971
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 12712
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(971)

文章存档

2019年(62)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: Oracle

2014-03-12 22:40:51

环境:
OS:Linux As 5
DB:10.2.0.5

  机房搬迁或是网络重新规划的时候,这个时候我们就需要修改节点的ip地址,下面说明如何修改两个节点的ip地址.

1.修改ip规划

public地址修改
192.168.1.106   node1   node1
192.168.1.107   node2   node2
计划修改为
192.168.1.116   node1   node1
192.168.1.117   node2   node2

vip地址修改
192.168.1.116   node1-vip       node1-vip
192.168.1.117   node2-vip       node2-vip
计划修改为
192.168.1.216   node1-vip       node1-vip
192.168.1.217   node2-vip       node2-vip

2.修改网卡i地址
[root@node1 network-scripts]# vi ifcfg-eth0

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:29:1F:C3:06
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.116
GATEWAY=192.168.1.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes


[root@node2 network-scripts]# vi ifcfg-eth0

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:0c:29:d1:b1:2b
NETMASK=255.255.255.0
IPADDR=192.168.1.117
GATEWAY=192.168.1.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=no

3.修改hosts文件
[root@node1 /]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

#Public
#Private
#Virtual
192.168.1.116   node1   node1
192.168.1.117   node2   node2
10.10.10.1      node1-priv      node1-priv
10.10.10.2      node2-priv      node2-priv
192.168.1.216   node1-vip       node1-vip
192.168.1.217   node2-vip       node2-vip

[root@node2 /]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

#Public
#Private
#Virtual
192.168.1.116   node1   node1
192.168.1.117   node2   node2
10.10.10.1      node1-priv      node1-priv
10.10.10.2      node2-priv      node2-priv
192.168.1.216   node1-vip       node1-vip
192.168.1.217   node2-vip       node2-vip

4.重启网路
分别在两个节点上重启网路

5.修改两个节点的监听器
node1-> vi listener.ora

# listener.ora.node1 Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.node1
# Generated by Oracle configuration tools.

SID_LIST_LISTENER_NODE1 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER_NODE1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.116)(PORT = 1521)(IP = FIRST))
    )
  )
 
 
node2-> vi listener.ora

# listener.ora.node2 Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.node2
# Generated by Oracle configuration tools.

SID_LIST_LISTENER_NODE2 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER_NODE2 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.117)(PORT = 1521)(IP = FIRST))
    )
  )
 
6.修改vip地址
节点1
node1-> oifcfg getif
eth0  192.168.1.0  global  public
eth1  10.10.10.0  global  cluster_interconnect
node1-> srvctl modify nodeapps -n node1 -A 192.168.1.116/255.255.255.0/eth0
PRKO-2117 : This command should be executed as the system privilege user.
node1-> su - root
Password:
[root@node1 ~]# /u01/app/oracle/product/10.2.0/crs_1/bin/srvctl modify nodeapps -n node1 -A 192.168.1.216/255.255.255.0/eth0

节点2
node2-> oifcfg getif
eth0  192.168.1.0  global  public
eth1  10.10.10.0  global  cluster_interconnect

[root@node2 ~]# /u01/app/oracle/product/10.2.0/crs_1/bin/srvctl modify nodeapps -n node2 -A 192.168.1.217/255.255.255.0/eth0

7.启动相应的服务
查看是否有没有启动的资源
node1-> crs_stat -t
若是有相关服务没有启动可以使用crs_start启动.

-- The End --

阅读(3864) | 评论(1) | 转发(2) |
给主人留下些什么吧!~~

woosuv2014-03-14 11:11:39

好牛X!我是看不太懂!脑子不够用!

评论热议
请登录后评论。

登录 注册