网络配置里主要配置监听和客户端连接,这里我着重写一下我平时如何来建监听的。前面我也写过一次《
手动建立监听》大家有兴趣的可以看看。
首先获取创建监听的模板,这个监听模板在$ORACLE_HOME/network/admin/samples下面,将模板拷贝到$ORACLE_HOME/network/admin目录
[oracle@icsts ~]$ cd $ORACLE_HOME/network/admin/
[oracle@icsts admin]$ cd samples
[oracle@icsts samples]$ ls
listener.ora sqlnet.ora tnsnames.ora
[oracle@icsts samples]$ cp listener.ora ../
[oracle@icsts samples]$ cd ..
[oracle@icsts admin]$ ls
listener.ora samples shrept.lst
修改监听模板
[oracle@icsts admin]$ vi listener.ora
# copyright (c) 1997 by the Oracle Corporation
#
# NAME
# listener.ora
# FUNCTION
# Network Listener startup parameter file example
# NOTES
# This file contains all the parameters for listener.ora,
# and could be used to configure the listener by uncommenting
# and changing values. Multiple listeners can be configured
# in one listener.ora, so listener.ora parameters take the form
# of SID_LIST_, where is the name of the listener
# this parameter refers to. All parameters and values are
# case-insensitive.
#
# This parameter specifies both the name of the listener, and
# it listening address(es). Other parameters for this listener
# us this name in place of . When not specified,
# the name for defaults to "LISTENER", with the default
# address value as shown below.
#
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
#这里是配置监听信息,主要修改HOST 和 PORT
# SID_LIST_
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=ICSTEST)
(SID_NAME=ICSTEST)
(ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1)
)
)
#这里是配置监听的静态信息,需要配置GLOBAL_DBNAME 、 SID_NAME 和ORACLE_HOME
启动监听
[oracle@icsts admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 07-JAN-2014 14:25:15
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 07-JAN-2014 14:25:15
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "ICSTEST" has 1 instance(s).
Instance "ICSTEST", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
基本上网络配置完成。
首先获取创建监听的模板,这个监听模板在$ORACLE_HOME/network/admin/samples下面,将模板拷贝到$ORACLE_HOME/network/admin目录
[oracle@icsts ~]$ cd $ORACLE_HOME/network/admin/
[oracle@icsts admin]$ cd samples
[oracle@icsts samples]$ ls
listener.ora sqlnet.ora tnsnames.ora
[oracle@icsts samples]$ cp listener.ora ../
[oracle@icsts samples]$ cd ..
[oracle@icsts admin]$ ls
listener.ora samples shrept.lst
修改监听模板
[oracle@icsts admin]$ vi listener.ora
# copyright (c) 1997 by the Oracle Corporation
#
# NAME
# listener.ora
# FUNCTION
# Network Listener startup parameter file example
# NOTES
# This file contains all the parameters for listener.ora,
# and could be used to configure the listener by uncommenting
# and changing values. Multiple listeners can be configured
# in one listener.ora, so listener.ora parameters take the form
# of SID_LIST_, where is the name of the listener
# this parameter refers to. All parameters and values are
# case-insensitive.
#
# This parameter specifies both the name of the listener, and
# it listening address(es). Other parameters for this listener
# us this name in place of . When not specified,
# the name for defaults to "LISTENER", with the default
# address value as shown below.
#
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
#这里是配置监听信息,主要修改HOST 和 PORT
# SID_LIST_
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=ICSTEST)
(SID_NAME=ICSTEST)
(ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1)
)
)
#这里是配置监听的静态信息,需要配置GLOBAL_DBNAME 、 SID_NAME 和ORACLE_HOME
启动监听
[oracle@icsts admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 07-JAN-2014 14:25:15
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 07-JAN-2014 14:25:15
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=icsts)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "ICSTEST" has 1 instance(s).
Instance "ICSTEST", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
基本上网络配置完成。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1067897/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11590946/viewspace-1067897/
215

被折叠的 条评论
为什么被折叠?



