前期准备:

如果你还没有在ubuntu上安装oracle请先看我之前到日志

1.

$su oracle

$ sqlplus /nolog

将出现如下连接数据库信息:

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 8 10:14:54 2011

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

SQL>


2.

SQL>  conn sys/超级管理员密码 as sysdba;

将出现下面信息,表示已经链接

Connected.


3.启动数据库

SQL> startup

将出现下面提示信息,表示数据库已经启动

ORACLE instance started.

Total System Global Area  322961408 bytes

Variable Size           104859000 bytes

Database Buffers         213909504 bytes

Redo Buffers               2973696 bytes

Database mounted.

Database opened.


4.开启监听

$su oracle

$ lsnrctl

将出现下面信息

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2011 10:03:52

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

Welcome to LSNRCTL, type "help" for information.

开启监听:

LSNRCTL> start

出现下面信息表示已经成功开启监听,启动监听完成后可以通过客户端连接到oracle数据库服务器

Starting /opt/ora10g/dbms/bin/tnslsnr: please wait...

System parameter file is /opt/ora10g/dbms/network/admin/listener.ora

Log messages written to /opt/ora10g/dbms/network/log/listener.log

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))





STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                08-JUL-2011 10:03:57

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /opt/ora10g/dbms/network/admin/listener.ora

Listener Log File         /opt/ora10g/dbms/network/log/listener.log

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

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

Services Summary...

Service "PLSExtProc" has 1 instance(s).

 Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully


Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ubuntu)(PORT=1521)))


5.打开oem服务

$emctl start dbconsole

出现下面信息,表示已经成功打开oem服务

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  

Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

http://ubuntu:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 10g Database Control ............................ started.

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

Logs are generated in directory /opt/ora10g/dbms/ubuntu_ORCL/sysman/log


oem地址为:

http://ubuntu:1158/em

http://wiki.ubuntu.org.cn/Ubuntu%E4%B8%8AOracle10g%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97#.