ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 设置 FTP、HTTP 访问 RAC ASM 磁盘组 .doc

设置 FTP、HTTP 访问 RAC ASM 磁盘组 .doc

原创 Linux操作系统 作者:perfychi 时间:2012-08-28 06:37:49 0 删除 编辑

    XML Database (XDB)使我们能够使用FTP和HTML协议访问和管理ASM磁盘组中的文件,可以方便的浏览和移入和移出。

    Oracle9i 支持 XML 数据库, 8080 是 Oracle XDB ( XML 数据库) Http 服务的默认端口, Oracle XDB 的Ftp 服务,默认端口是 2100 。 这2个端口与Tomcat 的端口是冲突的,所以我们在设置的时候可以改成其他端口。如:HTTP:8888, FTP: 2222。

 

 

 

【修改之前】

 

一. 查看端口信息

    在Oracle 10g默认情况下, 数据库FTP 和 HTTP的端口是关闭的。 这个我们可以通过如下两个函数来验证。

 

[oracle@yitai ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 27 21:14:47 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

 

SQL> select dbms_xdb.getftpport from dual;

GETFTPPORT
----------
         0

SQL> select dbms_xdb.gethttpport from dual;

GETHTTPPORT
-----------
          0

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
prod             OPEN

 

二.  查看监听

先查看一下监听,等会修改之后好做个对比:

[oracle@yitai ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 27-AUG-2012 21:15:06

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yitai.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                27-AUG-2012 21:12:48
Uptime                    0 days 0 hr. 2 min. 17 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=yitai.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...

Service "prod_XPT" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

 

【修改之后】

 

三. 配置FTP 和 HTTP 端口

 

SQL> exec dbms_xdb.setftpport(2222);

PL/SQL procedure successfully completed.

 

SQL> exec dbms_xdb.sethttpport(8888);

PL/SQL procedure successfully completed.

 

查看端口信息:

 

SQL> select dbms_xdb.gethttpport from dual;

 

GETHTTPPORT
-----------
       8888

 

SQL> select dbms_xdb.getftpport from dual;

 

GETHTTPPORT
-----------
       2222

 

四. 再次查看监听:

 

[oracle@yitai ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 27-AUG-2012 21:21:30

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yitai.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                27-AUG-2012 21:12:48
Uptime                    0 days 0 hr. 8 min. 41 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=yitai.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yitai.com)(PORT=2222))(Presentation=FTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yitai.com)(PORT=8888))(Presentation=HTTP)(Session=RAW))

Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...
Service "prod_XPT" has 1 instance(s).
  Instance "prod", status READY, has 1 handler(s) for this service...
The command completed successfully

 

五. 验证FTP 和 HTTP 访问ASM

5.1  FTP 访问

[root@yitai ~]# ftp yitai.com 2222

Connected to yitai.com.

220- yitai.com

Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.

220 yitai.com FTP Server (Oracle XML DB/Oracle Database) ready.

530  Please login with USER and PASS.

530  Please login with USER and PASS.

KERBEROS_V4 rejected as an authentication type

Name (yitai.com:root): system --数据库用户名

331 pass required for SYSTEM

Password:

230 SYSTEM logged in

Remote system type is Unix.

ftp> ls sys/asm

227 Entering Passive Mode (192,168,1,151,178,122)

150 ASCII Data Connection

drw-r--r--   2 SYS      oracle         0 AUG 27 13:27 DATA1

226 ASCII Transfer Complete

 

.

 

    连接成功。 注意这里用的登录名和密码是数据库的用户和密码。 并且是非sys用户。因为sys 的密码需要家 as sysdba. 这里没办法输入。

    登陆后在/sys/asm下可以找到ASM磁盘组信息。ftp的基本命令都可以使用。

 

 

 

5.2          HTTP 访问

 

1.JPG

2.JPG

3.JPG

4.JPG

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/27042095/viewspace-742023/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: ASM的体会
请登录后发表评论 登录
全部评论

注册时间:2012-06-06

  • 博文量
    484
  • 访问量
    2976332