close
零、作業系統:Oracle Enterprise Linux 6.2
Database:11gR2(11.2.0.1.0)
一、設定Linux IPv6的位址:
編輯 /etc/sysconfig/network-scripts/ifcfg-eth0,新增下列設定:
IPV6ADDR=fec0::a00:27ff:fe9a:a828/64
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
或者利用GUI的網路管理套件來設定也可以。
重新啟用網路設定:
# service network restart
查詢IP:
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:9A:A8:28
inet addr:192.168.56.200 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fec0::a00:27ff:fe9a:a828/64 Scope:Site
inet6 addr: fe80::a00:27ff:fe9a:a828/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7729 errors:0 dropped:0 overruns:0 frame:0
TX packets:5332 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:744708 (727.2 KiB) TX bytes:1014119 (990.3 KiB)
如果ifcfg-eth0的設定是正確的,會有兩個inet6 addr,一個是Link-local、另一個是Site-local或是Global。
不要像我使用Link-local IP來設定Oracle DB,肯定會出現錯誤的。
因為Link-local IP只能在同網段內使用,不能通過路由器。
所以要設定的IP為fec0::a00:27ff:fe9a:a828
二、確認Oracle DB的版本,因為目前只有Oracle 11gR2才有支援IPv6
# su - oracle
$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 26 13:08:33 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> select version from v$instance;
VERSION
-----------------
11.2.0.1.0
三、修改 $ORACLE_HOME/network/admin/listener.ora,增加如下面的第五列:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.200 )(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = fec0::a00:27ff:fe9a:a828)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /opt/oracle
重新啟用 listener
$ lsnrctl stop
$ lsnrctl start
四、修改client的tnsname.ora,內容主要是修改HOST的部份,如下:
TESTDB6 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fec0::a00:27ff:fe9a:a828)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = testdb)
)
)
以上設定完就可以了,只是我一開始都是用Link-local IP來設定,所以一直無法成功啟用listener。
在網址列輸入https:// [fec0::a00:27ff:fe9a:a828]:1158/em
Database:11gR2(11.2.0.1.0)
一、設定Linux IPv6的位址:
編輯 /etc/sysconfig/network-scripts/ifcfg-eth0,新增下列設定:
IPV6ADDR=fec0::a00:27ff:fe9a:a828/64
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
或者利用GUI的網路管理套件來設定也可以。
重新啟用網路設定:
# service network restart
查詢IP:
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:9A:A8:28
inet addr:192.168.56.200 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fec0::a00:27ff:fe9a:a828/64 Scope:Site
inet6 addr: fe80::a00:27ff:fe9a:a828/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7729 errors:0 dropped:0 overruns:0 frame:0
TX packets:5332 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:744708 (727.2 KiB) TX bytes:1014119 (990.3 KiB)
如果ifcfg-eth0的設定是正確的,會有兩個inet6 addr,一個是Link-local、另一個是Site-local或是Global。
不要像我使用Link-local IP來設定Oracle DB,肯定會出現錯誤的。
因為Link-local IP只能在同網段內使用,不能通過路由器。
所以要設定的IP為fec0::a00:27ff:fe9a:a828
二、確認Oracle DB的版本,因為目前只有Oracle 11gR2才有支援IPv6
# su - oracle
$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 26 13:08:33 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> select version from v$instance;
VERSION
-----------------
11.2.0.1.0
三、修改 $ORACLE_HOME/network/admin/listener.ora,增加如下面的第五列:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.200 )(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = fec0::a00:27ff:fe9a:a828)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /opt/oracle
重新啟用 listener
$ lsnrctl stop
$ lsnrctl start
四、修改client的tnsname.ora,內容主要是修改HOST的部份,如下:
TESTDB6 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fec0::a00:27ff:fe9a:a828)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = testdb)
)
)
以上設定完就可以了,只是我一開始都是用Link-local IP來設定,所以一直無法成功啟用listener。
在網址列輸入https:// [fec0::a00:27ff:fe9a:a828]:1158/em
全站熱搜
留言列表