OCM实验-网络配置

网络配置里主要配置监听和客户端连接,这里我着重写一下我平时如何来建监听的。前面我也写过一次《 手动建立监听》大家有兴趣的可以看看。

首先获取创建监听的模板,这个监听模板在$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/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值