你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle 11g 监听 配置修改 说明

[日期:2012-12-23] 来源:csdn  作者:tianlesoftware [字体:大 中 小]

3. 加密listener

 

有时候处于安全考虑,会需要对listener设置密码。

 

3.1 设置监听名

如果有多个监听,那么需要先设置当前的监听

LSNRCTL>set current_listener listener_name

 

 

3.2 设置密码

使用change_password设置listener口令。

 

LSNRCTL> change_password

Old password: --如果原来没有设置口令就直接回车,否则输入原来的口令

New password:

Reenter new password:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.4)(PORT=1521)))

Password changed for LISTENER

The command completed successfully

 

--保存密码:

LSNRCTL> save_config

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.4)(PORT=1521)))

Saved LISTENER configuration parameters.

Listener Parameter File /u01/app/Oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Old Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.bak

The command completed successfully

 

 

--加密之前:

[oracle@dave ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.3.0 -Production on 22-DEC-2012 22:54:55

 

Copyright (c) 1991, 2011, Oracle. All rights reserved.

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.4)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version11.2.0.3.0 - Production

Start Date 22-DEC-2012 21:57:46

Uptime 0 days 0 hr. 57 min. 9 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/dave/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.4)(PORT=1521)))

Services Summary...

Service "dave" has 2 instance(s).

Instance "dave", status UNKNOWN, has 1 handler(s) for thisservice...

Instance "dave", status READY, has 1 handler(s) for thisservice...

Service "daveXDB" has 1instance(s).

Instance "dave", status READY, has 1 handler(s) for thisservice...

 

 

--加密之后:

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.4)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version11.2.0.3.0 - Production

Start Date 22-DEC-2012 22:56:19

Uptime 0 days 0 hr. 11 min. 2 sec

Trace Level off

Security ON: Password or Local OSAuthentication

SNMP OFF

Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/dave/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.4)(PORT=1521)))

Services Summary...

Service "dave" has 2 instance(s).

Instance "dave", status UNKNOWN, has 1 handler(s) for thisservice...

Instance "dave", status READY, has 1 handler(s) for thisservice...

Service "daveXDB" has 1instance(s).

Instance "dave", status READY, has 1 handler(s) for this service...

The command completed successfully

 

 

--在listener.ora 文件中也会多一个配置参数:

[oracle@dave ~]$ cat/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

…

#----ADDED BY TNSLSNR 22-DEC-201221:59:58---

LOGGING_LISTENER = ON

#--------------------------------------------

 

#----ADDED BY TNSLSNR 22-DEC-201223:06:31---

PASSWORDS_LISTENER =1DF5C2FD0FE9CFA2

#--------------------------------------------

[oracle@dave ~]$

 

3.3 解除密码

listener的密码策略是防止stop,所以在stop时需要确认密码,在start时不需要输入密码。

 

LSNRCTL> set password

Password:

The command completed successfully

使用set password输入正确的密码后,就可以进行stop操作了。

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款