1、执行netca命令,选择"Listener configuration",点击Next
[oracle@ylm-100 samples]$ netca
Oracle Net Services Configuration:
Configuring Listener:LISTENER2
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
2、选择"Add",点击Next
3、输入监听程序名,点击Next
4、选择TCP协议,点击Next
5、选择端口号,点击Next
6、选择"Yes",点击Next
7、点击Finish完成配置
8、在/opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora路径下查看新增配置
[oracle@ylm-100 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 15-JUL-2020 14:35:10
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 15-JUL-2020 14:33:49
Uptime 0 days 0 hr. 1 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/ylm-100/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ylm-100)(PORT=1521)))
The listener supports no services
The command completed successfully
plsql能连接上的最终版的运行(新增了1522端口)
[oracle@ylm-100 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-JUL-2020 16:35:55
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.92.100)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 25-JUL-2020 16:28:05
Uptime 0 days 0 hr. 7 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/ylm-100/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.92.100)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.92.100)(PORT=1522)))
Services Summary...
Service "orcl" has 2 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully