有时为了特殊需要,在单机上要配置多个ip地址供客户端访问,例如:原先是rac,目前是单机dg,切换为主库后,为了减少客户端改动,单机也要多个
ip对外服务(奇葩要求就是多),也不复杂,改一下就好。
一、先停止侦听服务
lsnrctl stop
二、主机层面增加ip
1.检查主机是否添加1001 vlan虚拟网卡
entstat -d en0 | grep “vlan id”
2.添加虚拟网卡
关闭分区shutdown -f
修改分区profile文件增加vlan 1001虚拟网卡
启动分区
3.禁用192.168.0.203网卡
ifconfig en0 down
ifconfig en0 detach
smit chinet
4.新增网卡配置地址 192.168.0.112
smit chinet
5.增加生产其他网卡到主机
smit ---> communications applications and services ---> tcp/ip ---> further configuration ---> network interfaces
---> network interface selection ---> configure aliases ---> add an ipv4 network alias
增加网卡别名192.168.0.113、114、115
6.检查ip配置
ifconfig -a
7.修改hosts
修改/etc/hosts,将原先的修改为
192.168.0.112 db01
192.168.0.113 db01
192.168.0.114 db01
192.168.0.115 db01
三、侦听配置
vi $oracle_home/network/admin/listener.ora 修改为如下
listener =
(description_list =
(description =
(address = (protocol = tcp)(host = 192.168.0.112)(port = 1521))
)
(description_list =
(description =
(address = (protocol = tcp)(host = 192.168.0.113)(port = 1521))
)
(description_list =
(description =
(address = (protocol = tcp)(host = 192.168.0.114)(port = 1521))
)
(description_list =
(description =
(address = (protocol = tcp)(host = 192.168.0.115)(port = 1521))
)
(description =
(address = (protocol = ipc)(key = extproc0))
)
)
四、启动侦听
lsnrctl start
阅读(1296) | 评论(0) | 转发(0) |