[oracle@www ~]$ LANG=en_US netca
Oracle Net Services Configuration:
创建完成监听之后屏幕回显
Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.2.0/db_home1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0
[oracle@www ~]$
查看监听(修改红色HOST=本机的ip地址)
[oracle@www ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-MAR-2018 22:34:02
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=poweroff.cn)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 24-MAR-2018 22:27:07
Uptime 0 days 0 hr. 6 min. 54 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_home1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/www/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=poweroff.cn)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "prod.poweroff.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB.poweroff.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
The command completed successfully
vim listener.ora配置文件进行修改
[oracle@www ~]$ vim /u01/app/oracle/product/11.2.0/db_home1/network/admin/listener.ora
修改完成之后停止监听[oracle@www ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-MAR-2018 22:55:12
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.43.15)(PORT=1521)))
The command completed successfully
开启监听并查看HOST配置文件是否修改
[oracle@www ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-MAR-2018 22:56:38
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.43.15)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 24-MAR-2018 22:55:17
Uptime 0 days 0 hr. 1 min. 21 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_home1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/www/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.43.15)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "prod.poweroff.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB.poweroff.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
The command completed successfully
测试一下。
打开pc机的cmd。输入telnet ip地址 1521
看到上如说明监听配置成功。