作者sabreur (無奈)
看板Database
標題[討論] 怎麼連VM(CentOS7)內的 Oracle?
時間Mon Oct 20 12:50:07 2014
各位先進好
在下參考了下面兩篇文章 在CentOS7 中安裝了Oracle database
http://ppt.cc/bt8y
http://ppt.cc/CPIt
CentOS7 是VM 的Guest 將之固定IP設定為 192.168.56.101
Host 是 Win8
$ORACLE_HOME/network/admin/listener.ora 修改如下
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.101)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /ora01/app/oracle
$ORACLE_HOME/network/admin/tnsnames.ora 修改如下
ORA11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.101)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORA11G)
)
)
防火牆情況
[oracle@localhost admin]$ service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled)
Active: inactive (dead)
情況是
1. 用SSH 連線到192.168.56.101 -> OK
2. ping 192.168.56.101 -> OK
3. 用SQL Developer 連 192.168.56.101 -> 失敗
失敗原因:
執行要求的作業時發生錯誤:
IO 錯誤: The Network Adapter could not establish the connection
廠商代碼 17002
各位先進們 我想從Host連Guest的資料庫 我還少了哪裡沒設定麻?
謝謝各位
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.120.255.187
※ 文章網址: http://www.ptt.cc/bbs/Database/M.1413780610.A.89C.html
※ 編輯: sabreur (59.120.255.187), 10/20/2014 12:51:05
※ sabreur:轉錄至看板 Linux 10/20 13:04
推 iamnotfat: tnsping ORA11G 可以通嗎? 10/20 18:34
推 waterpeng: lsnrctl status正常嗎??? 10/20 20:41
謝謝大大提示... lsnrctl 啟動失敗
是我的host only那張網卡的固定ip沒有設定好..冏
然後重啟 lsnrctl & db 就可以連了 QQ"
※ 編輯: sabreur (111.254.212.106), 10/20/2014 22:48:31
※ 編輯: sabreur (111.254.212.106), 10/20/2014 23:23:27