linux监听配置命令 linux系统监听端口命令

linux下如何用命令来配置oracle11g的监听

这个不是命令配置的,是改文件

站在用户的角度思考问题,与客户深入沟通,找到滴道网站设计与滴道网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都网站制作、成都网站设计、企业官网、英文网站、手机端网站、网站推广、空间域名、网页空间、企业邮箱。业务覆盖滴道地区。

如果是服务端:

$ORACLE_HOME/network/ADMIN目录,修改LISTENER.ORA

到$ORACLE_HOME/bin下,通过lnsrctl start启动监听  lnsrctl stop | lnsrctl status 分别是停止监听和查看监听状态

如果是客户端:

$ORACLE_HOME/network/ADMIN目录,修改tnsnames.ora

==========================================================

配置LISTENER.ORA的demo:

LISTENER =                                                                     

(ADDRESS_LIST=                                                                

(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))                          

(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))                     

SID_LIST_LISTENER=                                                             

(SID_LIST=                                                                   

(SID_DESC=                                                                   

#BEQUEATH CONFIG                                                     

(GLOBAL_DBNAME=salesdb.mycompany)                                     

(SID_NAME=sid1)                                                         

(ORACLE_HOME=/private/app/oracle/product/8.0.3)                       

#PRESPAWN CONFIG                                                     

(PRESPAWN_MAX=20)                                                      

(PRESPAWN_LIST=                                                            

(PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))               

)                                                                      

)                                                                       

)                                                                        

配置tnsnames.ora的demo:

ora_xxx =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = ora11g)    -----这个地方填SID_NAME也行

)

)

linux操作系统下oracle数据库如何配置监听

1. 修改监听器配置文件

Linux下Oracle监听器配置文件在:$ ORACLE_HOME/network/admin/listerer.ora, 如:

/bank/oracle/oracle10g/product/10.2.0/network/admin/listener.ora

修改并配置要监听SID的相关信息,如:

#listener.ora Network Configuration File: /bank/oracle/oracle10g/product/10.2.0/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /bank/oracle/oracle10g/product/10.2.0)

(PROGRAM = extproc)

)

(SID_DESC =

(GLOBAL DBNAME = bkserver)

(SID_NAME = bkserver)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))

)

)

2. 启动监听器

(1). 切换至oracle安装用户(一般为oracle)

su - oracle

(2). 启动监听器

lsnrctl start

另:停止监听器

lsnrctl stop

3. 测试监听器是否运行正常

在客户端修改tnsnames.ora配置文件就访问Oracle数据库,如:

BKSERVER =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = BKSERVER)

)

)

通过命令tnsping测试是否能访问到监听器,如:

M:\tnsping bkserver

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-8月 -

2010 17:11:04

Copyright (c) 1997, 2005, Oracle. All rights reserved.

已使用的参数文件:

D:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 10.7.13.242)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVIC

E_NAME = BKSERVER)))

OK (20 毫秒)

注意: 监听器是否能被tnsping通跟数据库的开启/关闭无关,所以就算可以tnsping通监听器但未必能连接到数据库,这时请检查listener.ora文件配置信息是否正确,还有数据库是否已经被开启。

有关linux命令监听某个进程怎么写

第一个的话可以用

ps aux | grep abc | grep -v grep

如果返回值为0,那这个进程存在,如果不为0,那就不存在,下一步去启动它。

第二个的话,端口开启什么意思?如果没有socket,或者说一个程序去监听一个端口,那单靠脚本是搞不了的


网站标题:linux监听配置命令 linux系统监听端口命令
浏览地址:http://lszwz.com/article/doshshi.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款