In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to modify the IP address on rac in linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to modify the IP address on rac in linux.
IP before modification:
# PUBLIC IP #
192.168.11.100 db1
192.168.11.200 db2
# VIP #
192.168.11.111 db1_vip
192.168.11.222 db2_vip
# SCAN IP #
192.168.11.101 scanip
Modified IP:
# PUBLIC IP #
192.168.57.100 db1
192.168.57.200 db2
# VIP #
192.168.57.111 db1_vip
192.168.57.222 db2_vip
# SCAN IP #
192.168.57.101 scanip
Modify the network segment 11. Change it to 57.
As soon as you are ready
1 close the database
[grid@db1] $srvctl status database-d orcl
Instance orcl1 is running on node db1
Instance orcl2 is running on node db2
[grid@db1] $srvctl stop database-d orcl
[grid@db1] $srvctl status database-d orcl
Instance orcl1 is not running on node db1
Instance orcl2 is not running on node db2
2 View the information of the original scan
[grid@db1 ~] $srvctl config scan
SCAN name: scanip, Network: 1/192.168.11.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: / scanip/192.168.11.101
[grid@db1 ~] $srvctl config listener
Name: LISTENER
Network: 1, Owner: grid
Home:
End points: TCP:1521
3 close listener and crs
[grid@db1 ~] $srvctl stop listener
[grid@db1] $crsctl stop crs-f
CRS-4563: Insufficient user privileges.
CRS-4000: Command Stop failed, or completed with errors.
[grid@db1 ~] $su root
Password:
[root@db1 grid] # crsctl stop crs-f
[root@db2 grid] # crsctl stop crs-f
4 modify / etc/hosts (two nodes)
[root@db1 ~] # vi / etc/hosts
# PUBLIC IP #
192.168.57.100 db1
192.168.57.200 db2
5 modify os Nic information (two nodes)
Vi / etc/sysconfig/network-scripts/ifcfg-eth0
Service network restart
Then reconfigure the network card connection mode on the virtual machine, (create a new virtual network card virtual machine on the host and bridge it on the network card)
6 start crs (two nodes)
[root@db1 grid] # crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@db2 grid] # crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
1 modify public ip
-Node 1
1 View information (original)
[root@db1 grid] # oifcfg getif
Eth2 10.0.0.0 global cluster_interconnect
Eth0 192.168.11.0 global public
2 delete the original ip
[root@db1 grid] # oifcfg delif-global eth0/192.168.11.0
3 register a new ip
[root@db1 grid] # oifcfg setif-global eth0/192.168.57.0:public
4 Verification
[root@db1 grid] # oifcfg getif
Eth2 10.0.0.0 global cluster_interconnect
Eth0 192.168.57.0 global public
-Node 2
[root@db2 grid] # oifcfg getif
Eth2 10.0.0.0 global cluster_interconnect
Eth0 192.168.57.0 global public-the network segment has been changed. I feel like I don't have to delete it and add it again.
[root@db2 grid] # oifcfg delif-global eth0/192.168.11.0
[root@db2 grid] # oifcfg setif-global eth0/192.168.57.0:public
[root@db2 grid] # oifcfg getif
Eth2 10.0.0.0 global cluster_interconnect
Eth0 192.168.57.0 global public
2 modify vip
1 View vip configuration
[root@db2 admin] # srvctl config nodeapps-a
Network exists: 1/192.168.11.0/255.255.255.0/eth0, type static
VIP exists: / db1_vip/192.168.11.111/192.168.11.0/255.255.255.0/eth0, hosting node db1
VIP exists: / db2_vip/192.168.11.222/192.168.11.0/255.255.255.0/eth0, hosting node db2
2 stop instances and vip
[root@db1 grid] # srvctl stop instance-d rac-n db1
[root@db1 grid] # srvctl stop vip-n db1-f
[root@db2 grid] # srvctl stop instance-d rac-n db2
[root@db2 grid] # srvctl stop vip-n db2-f
3 modify hosts file (root two nodes)
Vi / etc/hosts
# VIP #
192.168.57.111 db1_vip
192.168.57.222 db2_vip
4 modify the configuration of vip
-Node 1
[root@db1 grid] # / grid/11.2.0/grid/bin/srvctl modify nodeapps-n db2-A 192.168.57.111/255.255.255.0/eth0
-Node 2
[root@db2 grid] # / grid/11.2.0/grid/bin/srvctl modify nodeapps-n db2-A 192.168.57.222/255.255.255.0/eth0
5 start
-Node 1
[root@db1 grid] # srvctl start vip-n db1
PRKO-2420: VIP is already started on node (s): db1
[root@db1 grid] # srvctl start listener-n db1
[root@db1 grid] # srvctl start instance-d rac-n db1
-Node 2
[root@db2 grid] # srvctl start vip-n db2
[root@db2 grid] # srvctl start listener-n db2
[root@db2 grid] # srvctl start instance-d rac-n db2
6 Verification
[root@db2 grid] # srvctl config nodeapps-a
Network exists: 1/192.168.57.0/255.255.255.0/eth0, type static
VIP exists: / db1_vip/192.168.57.111/192.168.57.0/255.255.255.0/eth0, hosting node db1
VIP exists: / 192.168.57.222/192.168.57.222/192.168.57.0/255.255.255.0/eth0, hosting node db2
For some reason, the name of vip doesn't appear here, and it doesn't affect much.
3 modify scan ip (single node execution)
1 stop scan service and scan
[root@db1 grid] # srvctl stop scan_listener
[root@db1 grid] # srvctl stop scan
2 modify host file
Vi / etc/hosts
# SCAN IP #
192.168.57.101 scanip
3 modify scan configuration (root)
[root@db1 grid] # srvctl modify scan-n scanip-- here is the name of the scanip parsed by your own hosts
4 modify scan listener configuration
[root@db1 grid] # srvctl modify scan_listener-u
5 start
[root@db1 grid] # srvctl start scan_listener
6 start the database
[root@db1 grid] # srvctl start database-d orcl
7 Verification
[root@db1 grid] # srvctl config scan
SCAN name: scanip, Network: 1/192.168.57.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: / scanip/192.168.57.101
-- View cluster resources
[root@db1 grid] # crsctl stat res-t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
Ora.LISTENER.lsnr
ONLINE ONLINE db1
ONLINE ONLINE db2
Ora.gsd
OFFLINE OFFLINE db1
OFFLINE OFFLINE db2
Ora.net1.network
ONLINE ONLINE db1
ONLINE ONLINE db2
Ora.ons
ONLINE ONLINE db1
ONLINE ONLINE db2
Cluster Resources
Ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE db2
Ora.db1.vip
1 ONLINE ONLINE db1
Ora.db2.vip
1 ONLINE ONLINE db2
Ora.orcl.db
1 ONLINE ONLINE db1 Open
2 ONLINE ONLINE db2 Open
Ora.scan1.vip
1 ONLINE ONLINE db2
Knowledge supplement:
-- add scan
[root@db1 grid] # srvctl add scan scanip
-- add instance
$srvctl add instance-d orcl-I orcl1-n db1
$srvctl add instance-d orcl-I orcl2-n db2
Srvctl start instance-d orcl-n db1
Srvctl start instance-d orcl-n db2
-- add database
Srvctl add database-d orcl-o / oracle/home-p + DATA/orcl/spfileorcl.ora
Srvctl start database-d orcl
-- add local snooping
Srvctl add listener-l listener
Crsctl start resource ora.LISTENER.lsnr
-- add scan resources
Srvctl add scan-n scanip
Srvctl start scan
At this point, I believe you have a deeper understanding of "how to modify the IP address on rac in linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.