真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

rac如何修改ip地址

小編給大家分享一下rac如何修改ip地址,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

平樂(lè)網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),平樂(lè)網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為平樂(lè)上千多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的平樂(lè)做網(wǎng)站的公司定做!



oracle release 11.2.0.4.0
本次實(shí)驗(yàn)?zāi)J絥etmask:255.255.255.0


一:修改主機(jī)ip,vip,scan(網(wǎng)卡名稱不變)
二:修改Private IP
三:修改公網(wǎng)網(wǎng)卡名稱,ip地址不變
四:修改Private網(wǎng)卡名稱,ip地址不變
五:修改公網(wǎng)網(wǎng)卡名稱,ip 
六:修改Private網(wǎng)卡名稱,ip
附錄:子網(wǎng)掩碼地址計(jì)算




*****************************
*****************************
備份:2臺(tái)主機(jī):


私有網(wǎng)絡(luò)配置不僅僅存在ocr中,還存在gpnp profile中,所以首先需要備份profile.xml:
[grid@host01 peer]$ pwd
/u01/11.2.0/grid/gpnp/host01/profiles/peer
[grid@host01 peer]$ ls
pending.xml  profile.old  profile_orig.xml  profile.xml
[grid@host01 peer]$ cp profile.xml profile.xml.bak


[root@host02 ~]# 
[root@host02 ~]# cd /u01/11.2.0/grid/gpnp/host02/profiles/peer/
[root@host02 peer]# ls
profile_orig.xml  profile.xml
[root@host02 peer]# cp profile.xml profile.xml.bak


Ocr備份:
[root@host01 ~]# /u01/11.2.0/grid/bin/ocrconfig -manualbackup


host02     2018/03/29 08:48:19     /u01/11.2.0/grid/cdata/host-cluster/backup_20180329_084819.ocr
[root@host01 ~]# /u01/11.2.0/grid/bin/ocrconfig -showbackup


host02     2018/03/29 06:08:55     /u01/11.2.0/grid/cdata/host-cluster/backup00.ocr


host02     2018/03/29 02:08:55     /u01/11.2.0/grid/cdata/host-cluster/backup01.ocr


host02     2018/03/28 22:08:54     /u01/11.2.0/grid/cdata/host-cluster/backup02.ocr


host02     2018/03/28 22:08:54     /u01/11.2.0/grid/cdata/host-cluster/day.ocr


host02     2018/03/28 22:08:54     /u01/11.2.0/grid/cdata/host-cluster/week.ocr


host02     2018/03/29 08:48:19     /u01/11.2.0/grid/cdata/host-cluster/backup_20180329_084819.ocr


hosts配置文件備份:


cp /etc/hosts /tmp/hosts.bak0329


*****************************
情景一
*****************************
修改主機(jī)ip,vip,scan(網(wǎng)卡名稱不變)
修改之前:
#192.168.0.35 host01
#192.168.0.36 host01-vip
#192.168.0.38 host02
#192.168.0.39 host02-vip
#192.168.0.40 scan
修改之后:
172.16.0.135 host01
172.16.0.136 host01-vip
172.16.0.138 host02
172.16.0.139 host02-vip
172.16.0.140 scan




1.正常關(guān)庫(kù)、監(jiān)聽(tīng)和CRS
######/u01/11.2.0/grid/bin/crsctl stop crs
2.修改/etc/hosts配置文件
172.16.0.135 host01
172.16.0.136 host01-vip
172.16.0.138 host02
172.16.0.139 host02-vip
172.16.0.140 scan
3.OS層修改公有網(wǎng)卡地址


4.啟動(dòng)crs
######/u01/11.2.0/grid/bin/crsctl start crs
5.修改Public IP


[grid@host01 ~]$ oifcfg iflist
eth4  172.16.0.0
eth5  10.168.0.0
eth5  169.254.0.0


[grid@host01 ~]$ oifcfg getif
eth4  192.168.0.0  global  public
eth5  10.168.0.0  global  cluster_interconnect
[grid@host01 ~]$ oifcfg delif -global eth4
[grid@host01 ~]$ oifcfg setif -global eth4/172.16.0.0:public
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth4  172.16.0.0  global  public




6.修改VIP--停止數(shù)據(jù)庫(kù)和監(jiān)聽(tīng)
srvctl stop vip -n host01
srvctl stop vip -n host02


#root用戶修改:
srvctl modify nodeapps -n host01 -A 172.16.0.136/255.255.255.0/eth4
srvctl modify nodeapps -n host02 -A 172.16.0.139/255.255.255.0/eth4


[root@host01 ~]# /u01/11.2.0/grid/bin/srvctl config vip -n host01
VIP exists: /172.16.0.136/172.16.0.136/172.16.0.0/255.255.255.0/eth4, hosting node host01
[root@host01 ~]# /u01/11.2.0/grid/bin/srvctl config vip -n host02
VIP exists: /host02-vip/172.16.0.139/172.16.0.0/255.255.255.0/eth4, hosting node host02




/u01/11.2.0/grid/bin/srvctl start vip -n host01
/u01/11.2.0/grid/bin/srvctl start vip -n host02




確認(rèn)local_listener信息:
檢查local_listener信息,如果不正確需要修改,我這里查詢是正確的。


--兩個(gè)節(jié)點(diǎn)分別確認(rèn):
show parameter local_listener
--修改:
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.136)(PORT=1521))' sid='orcl1';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.139)(PORT=1521))' sid='orcl2';


7.修改SCAN VIP


 srvctl stop scan_listener
 srvctl stop scan
 srvctl status scan_listener
 srvctl status scan
#root
/u01/11.2.0/grid/bin/srvctl modify scan -n scan
/u01/11.2.0/grid/bin/srvctl  config scan
SCAN name: scan, Network: 1/172.16.0.0/255.255.255.0/eth4
SCAN VIP name: scan1, IP: /scan/172.16.0.140


/u01/11.2.0/grid/bin/srvctl  start scan
/u01/11.2.0/grid/bin/srvctl  start scan_listener




*****************************
情景二
*****************************
修改Private IP


修改前:
10.168.0.123/24--eth5
10.168.0.124/24--eth5
修改后地址
100.16.0.23/24--eth5
100.16.0.24/24--eth5




1,添加新的網(wǎng)絡(luò)信息
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth4  192.168.0.0  global  public
[grid@host01 ~]$ 
##新的子網(wǎng)具有相同網(wǎng)卡的名稱但不同的子網(wǎng):
[grid@host01 ~]$ oifcfg setif -global eth5/100.16.0.0:cluster_interconnect
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth5  100.16.0.0  global  cluster_interconnect
eth4  172.16.0.0  global  public


2,關(guān)閉crs
#root執(zhí)行
/u01/11.2.0/grid/bin/crsctl stop crs


3,修改主機(jī)ip地址


4,啟動(dòng)crs
/u01/11.2.0/grid/bin/crsctl start crs


5,刪除舊的網(wǎng)絡(luò)信息
[grid@host01 ~]$ oifcfg delif -global eth5/10.168.0.0
[grid@host01 ~]$ oifcfg getif
eth5  100.16.0.0  global  cluster_interconnect
eth6  172.16.0.0  global  public






*****************************
情景三
*****************************
公網(wǎng)網(wǎng)卡名稱 eth4===>eth6


1,修改網(wǎng)卡信息
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth5  100.16.0.0  global  cluster_interconnect
eth4  172.16.0.0  global  public
[grid@host01 ~]$ oifcfg iflist
eth6  172.16.0.0
eth5  100.16.0.0
eth5  169.254.0.0
[grid@host01 ~]$ oifcfg setif -global eth6/172.16.0.0:public
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth5  100.16.0.0  global  cluster_interconnect
eth4  172.16.0.0  global  public
eth6  172.16.0.0  global  public
[grid@host01 ~]$ oifcfg delif -global eth4/172.16.0.0:public
[grid@host01 ~]$ oifcfg getif
eth5  10.168.0.0  global  cluster_interconnect
eth5  100.16.0.0  global  cluster_interconnect
eth6  172.16.0.0  global  public


2,停止crs
3,修改操作系統(tǒng)網(wǎng)卡名稱
4,啟動(dòng)crs
5,修改vip,scan
#root執(zhí)行
srvctl stop vip -n host01
srvctl stop vip -n host02
srvctl modify nodeapps -n host01 -A 172.16.0.136/255.255.255.0/eth6
srvctl modify nodeapps -n host02 -A 172.16.0.139/255.255.255.0/eth6


[root@host01 host01]# /u01/11.2.0/grid/bin/srvctl config vip -n host01
VIP exists: /172.16.0.136/172.16.0.136/172.16.0.0/255.255.255.0/eth6, hosting node host01
[root@host01 host01]# /u01/11.2.0/grid/bin/srvctl config vip -n host02
VIP exists: /host02-vip/172.16.0.139/172.16.0.0/255.255.255.0/eth6, hosting node host02


/u01/11.2.0/grid/bin/srvctl start vip -n host01
/u01/11.2.0/grid/bin/srvctl start vip -n host02


*****************************
情景四
*****************************


修改Private網(wǎng)卡名稱 eth5===>eth4


1,添加新的網(wǎng)絡(luò)信息
[grid@host01 ~]$ 
[grid@host01 ~]$ oifcfg setif -global eth4/100.16.0.0:cluster_interconnect
[grid@host01 ~]$ oifcfg getif
eth5  100.16.0.0  global  cluster_interconnect
eth6  172.16.0.0  global  public
eth4  100.16.0.0  global  cluster_interconnect


2,停止crs
3,修改主機(jī)網(wǎng)卡信息
4,啟動(dòng)crs
5,刪除多余網(wǎng)絡(luò)信息
[grid@host01 ~]$ oifcfg getif
eth5  100.16.0.0  global  cluster_interconnect
eth6  172.16.0.0  global  public
eth4  100.16.0.0  global  cluster_interconnect
[grid@host01 ~]$ oifcfg delif -global eth5/100.16.0.0
[grid@host01 ~]$ oifcfg getif
eth6  172.16.0.0  global  public
eth4  100.16.0.0  global  cluster_interconnect






===========
修改之前:
[root@host02 network-scripts]# ip a s
1: lo: mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth6: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:06:87 brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.138/24 brd 172.16.0.255 scope global eth6
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:687/64 scope link 
       valid_lft forever preferred_lft forever
3: eth4: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8e:8c:39 brd ff:ff:ff:ff:ff:ff
4: eth5: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:2d:83 brd ff:ff:ff:ff:ff:ff
    inet 100.16.0.24/24 brd 100.16.0.255 scope global eth5
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:2d83/64 scope link 
       valid_lft forever preferred_lft forever


=============
修改之后
[root@host02 network-scripts]# ip a s
1: lo: mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth6: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:06:87 brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.138/24 brd 172.16.0.255 scope global eth6
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:687/64 scope link 
       valid_lft forever preferred_lft forever
3: eth4: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:8c:39 brd ff:ff:ff:ff:ff:ff
    inet 100.16.0.24/24 brd 100.16.0.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:8c39/64 scope link 
       valid_lft forever preferred_lft forever
4: eth5: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8e:2d:83 brd ff:ff:ff:ff:ff:ff
=========




***************************
五:修改公網(wǎng)網(wǎng)卡名稱,ip 
***************************
修改之前:<<<==========eth6


172.16.0.135 host01
172.16.0.136 host01-vip
172.16.0.138 host02
172.16.0.139 host02-vip
172.16.0.140 scan


[root@host01 network-scripts]# ip a s
1: lo: mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth6: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:71:9f brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.135/24 brd 172.16.0.255 scope global eth6
       valid_lft forever preferred_lft forever
    inet 172.16.0.136/24 brd 172.16.0.255 scope global secondary eth6:3
       valid_lft forever preferred_lft forever
    inet 172.16.0.140/24 brd 172.16.0.255 scope global secondary eth6:2
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:719f/64 scope link 
       valid_lft forever preferred_lft forever
3: eth4: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:48:2b brd ff:ff:ff:ff:ff:ff
    inet 100.16.0.23/24 brd 100.16.0.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet 169.254.199.73/16 brd 169.254.255.255 scope global eth4:1
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:482b/64 scope link 
       valid_lft forever preferred_lft forever
4: eth5: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8e:a3:f9 brd ff:ff:ff:ff:ff:ff


修改之后:<<<==========eth5
192.168.0.35 host01
192.168.0.36 host01-vip
192.168.0.38 host02
192.168.0.39 host02-vip
192.168.0.40 scan


1,停止crs
2,修改hosts
3,修改主機(jī)ip地址到新網(wǎng)卡
4,啟動(dòng)crs
5,修改網(wǎng)卡信息
[grid@host01 ~]$ oifcfg iflist
eth4  100.16.0.0
eth4  169.254.0.0
eth5  192.168.0.0


[grid@host01 ~]$ oifcfg getif
eth6  172.16.0.0  global  public
eth4  100.16.0.0  global  cluster_interconnec
[grid@host01 ~]$ oifcfg delif -global eth6
[grid@host01 ~]$ oifcfg setif -global eth5/192.168.0.0:public
[grid@host01 ~]$ oifcfg setif -global eth5/192.168.0.0:public
[grid@host01 ~]$ oifcfg getif
eth4  100.16.0.0  global  cluster_interconnect
eth5  192.168.0.0  global  public




6,修改vip,scan地址
#root用戶修改:
srvctl stop vip -n host01
srvctl stop vip -n host02


#root用戶修改:
srvctl modify nodeapps -n host01 -A 192.168.0.36/255.255.255.0/eth5
srvctl modify nodeapps -n host02 -A 192.168.0.39/255.255.255.0/eth5


/u01/11.2.0/grid/bin/srvctl start vip -n host01
/u01/11.2.0/grid/bin/srvctl start vip -n host02




確認(rèn)local_listener信息:
檢查local_listener信息,如果不正確需要修改,我這里查詢是正確的。


--兩個(gè)節(jié)點(diǎn)分別確認(rèn):
show parameter local_listener
--修改:
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST= host01-vip)(PORT=1521))' sid='orcl1';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST= host02-vip)(PORT=1521))' sid='orcl2';




#修改scan
 srvctl stop scan_listener
 srvctl stop scan
 srvctl status scan_listener
 srvctl status scan
#root
/u01/11.2.0/grid/bin/srvctl modify scan -n scan
/u01/11.2.0/grid/bin/srvctl  config scan
SCAN name: scan, Network: 1/192.168.0.0/255.255.255.0/eth5
SCAN VIP name: scan1, IP: /scan/192.168.0.40


/u01/11.2.0/grid/bin/srvctl  start scan
/u01/11.2.0/grid/bin/srvctl  start scan_listener


修改之后ip地址信息:
[root@host01 network-scripts]# ip a s
1: lo: mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth6: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8e:71:9f brd ff:ff:ff:ff:ff:ff
3: eth4: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:48:2b brd ff:ff:ff:ff:ff:ff
    inet 100.16.0.23/24 brd 100.16.0.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet 169.254.199.73/16 brd 169.254.255.255 scope global eth4:1
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:482b/64 scope link 
       valid_lft forever preferred_lft forever
4: eth5: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:a3:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.35/24 brd 192.168.0.255 scope global eth5
       valid_lft forever preferred_lft forever
    inet 192.168.0.40/24 brd 192.168.0.255 scope global secondary eth5:1
       valid_lft forever preferred_lft forever
    inet 192.168.0.36/24 brd 192.168.0.255 scope global secondary eth5:3
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:a3f9/64 scope link 
       valid_lft forever preferred_lft forever


***************************
六:修改Private網(wǎng)卡名稱,ip
***************************
修改之前網(wǎng)絡(luò)信息:《============eth4
100.16.0.23 
100.16.0.24


2: eth6: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8e:71:9f brd ff:ff:ff:ff:ff:ff
3: eth4: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8e:48:2b brd ff:ff:ff:ff:ff:ff
    inet 100.16.0.23/24 brd 100.16.0.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet 169.254.199.73/16 brd 169.254.255.255 scope global eth4:1
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8e:482b/64 scope link 
       valid_lft forever preferred_lft forever


修改之后網(wǎng)絡(luò)信息:《============eth6
10.10.10.123 
10.10.10.124


1,修改網(wǎng)絡(luò)接口信息
[grid@host01 ~]$ oifcfg setif -global eth6/10.10.10.0:cluster_interconnect
[grid@host01 ~]$ oifcfg getif
eth4  100.16.0.0  global  cluster_interconnect
eth5  192.168.0.0  global  public
eth6  10.10.10.0  global  cluster_interconnect


2,關(guān)閉crs
3,修改主機(jī)網(wǎng)卡IP信息
4,啟動(dòng)crs
5,刪除多余網(wǎng)絡(luò)接口信息
[grid@host01 ~]$ oifcfg getif
eth4  100.16.0.0  global  cluster_interconnect
eth5  192.168.0.0  global  public
eth6  10.10.10.0  global  cluster_interconnect
[grid@host01 ~]$ oifcfg delif -global eth4
[grid@host01 ~]$ oifcfg getif
eth5  192.168.0.0  global  public
eth6  10.10.10.0  global  cluster_interconnect






附錄:


子網(wǎng)掩碼地址,在使用oifcfg 需要計(jì)算subnet。
Name:
oifcfg - Oracle Interface Configuration Tool.


Usage:  oifcfg iflist [-p [-n]]
oifcfg setif {-node | -global} {/:}...


IP地址 192.168.0.1
子網(wǎng)掩碼 255.255.255.0
AND運(yùn)算(AND運(yùn)算法則:1 與1 = 1 ,1 與0 = 0 ,0 與1 = 0 ,0 與0 = 0 ,即當(dāng)對(duì)應(yīng)位均為1時(shí)結(jié)果為1,其余為0。)
轉(zhuǎn)化為二進(jìn)制進(jìn)行運(yùn)算:
I P 地址 11000000.10101000.00000000.00000001
子網(wǎng)掩碼 11111111.11111111.11111111.00000000
AND運(yùn)算
11000000.10101000.00000000.00000000
轉(zhuǎn)化為十進(jìn)制后為:
192.168.0.0  <==========該地址為oifcfg需要的地址。

以上是“rac如何修改ip地址”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


當(dāng)前名稱:rac如何修改ip地址
瀏覽地址:http://weahome.cn/article/ijijgh.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部