1.hosts文件中设置#号注释
192.200.54.41 test.hzhospital.com test
192.200.54.42 test2.hzhospital.com test2
173.168.1.1 test-priv.hzhospital.com test-priv
173.168.1.2 test2-priv.hzhospital.com test2-priv
####
#192.200.54.240 test-vip1.hzhospital.com test-vip1
#192.200.54.241 test-vip2.hzhospital.com test-vip2
#192.200.54.242 test-scan.hzhospital.com test-scan
####
192.200.54.241 test-vip1.hzhospital.com test-vip1
192.200.54.242 test-vip2.hzhospital.com test-vip2
192.200.54.240 test-scan.hzhospital.com test-scan
#########################
2.关VIP及SCAN--关数据库
关闭数据库orcle用户:srvctl stop database -d syorcl
普通修改用GRID用户:
srvctl stop vip -n test -f
srvctl stop vip -n test2 -f
srvctl stop listener -n test
srvctl stop listener -n test2
srvctl stop scan_listener
srvctl stop scan
#########################
3.修改VIP及SCAN IP
srvctl config nodeapps -a
修改VIP
srvctl modify nodeapps -n test -A test-vip1.hzhospital.com/255.255.255.0/pubnet
srvctl modify nodeapps -n test2 -A test-vip2.hzhospital.com/255.255.255.0/pubnet
==检查
srvctl config nodeapps -a
修改SCAN用root用户
rvctl config scan
[root@test etc]# /u01/app/19.0.0.0/grid/bin/srvctl modify scan -n test-scan
检查 srvctl config scan
#########################
4.启动:
启动监听程序
srvctl start scan
srvctl start scan_listener
启动VIP/监听
srvctl start vip -n test
srvctl start vip -n test2
srvctl start listener -n test
srvctl start listener -n test2
启动数据库orcle用户:srvctl start database -d syorcl
查看监听状态
lsnrctl status
lsnrctl status LISTENER_SCAN1
crsctl stat res -t