[[email protected] ~]$ /sbin/ifconfig
eth1 Link encap:Ethernet HWaddr 00:25:90:04:AB:6B
inet addr:192.168.9.140 Bcast:192.168.15.255 Mask:255.255.248.0
inet6 addr: fe80::225:90ff:fe04:ab6b /64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23530402 errors:0 dropped:0 overruns:0 frame:0
TX packets:10959123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15308483748 (14.2 GiB) TX bytes:10087987532 (9.3 GiB)
--IP地址为192.168.9.140
[[email protected] ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 ecp-db localhost.localdomain localhost
192.168.9.140 node1.srtcloud.com
--域名node1.srtcloud.com对应ip192.168.9.140
[[email protected] ~]$ lsnrctl status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1.srtcloud.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 04-NOV-2011 09:08:51
Uptime 21 days 4 hr. 58 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/10 .2.0 /db_1/network/admin/listener .ora
Listener Log File /opt/oracle/product/10 .2.0 /db_1/network/log/listener .log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1.srtcloud.com)(PORT=1521)))
Services Summary...
Service "ecp" has 2 instance(s).
Instance "ecp" , status UNKNOWN, has 1 handler(s) for this service...
Instance "ecp" , status READY, has 1 handler(s) for this service...
Service "ecpXDB" has 1 instance(s).
Instance "ecp" , status READY, has 1 handler(s) for this service...
Service "ecp_XPT" has 1 instance(s).
Instance "ecp" , status READY, has 1 handler(s) for this service...
Service "ora11g" has 2 instance(s).
Instance "ora11g" , status UNKNOWN, has 1 handler(s) for this service...
Instance "ora11g" , status READY, has 1 handler(s) for this service...
Service "ora11gXDB" has 1 instance(s).
Instance "ora11g" , status READY, has 1 handler(s) for this service...
The command completed successfully
--说明:ora11g是oracle 11g,ecp是oracle 10g
--当前使用域名node1.srtcloud.com监听
[[email protected] ~]$ more /opt/oracle/product/10 .2.0 /db_1/network/admin/tnsnames .ora
# tnsnames.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ECP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1.srtcloud.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ecp)
)
)
ORA11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1.srtcloud.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
--tns也通过域名访问
[[email protected] ~]$ more /etc/resolv .conf
nameserver 211.155.235.201
nameserver 211.155.235.188
--当前有效的dns服务器
[[email protected] ~]$ more /etc/nsswitch .conf | grep hosts:
hosts: files dns
--域名解析顺序
|