有时为了特殊需要,在单机上要配置多个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
阅读(1405) | 评论(0) | 转发(0) |