您的位置:首页 > 数据库 > Oracle

vmware Workstation下安装redhat linux+oracle12c 之七 配置oracle

2017-11-13 16:50 176 查看
最后一步了-----------要跟大伙说拜拜了

注意这里是 su - oracle 用户下

[oracle@localhost admin]$lsnrctl start

------启动监听

LSNRCTL for Linux: Version 12.1.0.2.0 -Production on 25-AUG-2016 20:14:09

 

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

 

Starting /u01/app/oracle/product/12.1.0/db_1/bin/tnslsnr:please wait...

 

TNSLSNR for Linux: Version 12.1.0.2.0 -Production

System parameter file is/u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora

Log messages written to/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml

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

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

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version12.1.0.2.0 - Production

Start Date                25-AUG-2016 20:14:09

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/12.1.0/db_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

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

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

The listener supports no services

The command completed successfully

[oracle@localhost admin]$

 

 ----------下面是我遇到的错误,教你们如何更正。估计是上一章中

cd /u01/app/oralnventory

./orainstRoot.sh

cd /u01/app/oracle/product/12.1.0/db_1

./root.sh
这两个东西执行不到位,或者哪里报错,不怕,可以解决的。
[oracle@localhost ~]$sqlplus / as sysdba

 

SQL*Plus: Release 12.1.0.2.0 Production onFri Aug 26 11:43:06 2016

 

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

 

Connected to an idle instance.

 

SQL> startup

ORA-01078: failure in processing systemparameters

LRM-00109: could not open parameter file'/u01/app/oracle/product/12.1.0/db_1/dbs/inittesttest.ora'

SQL>exit

[oracle@localhost ~]$cd /home/oracle

[oracle@localhost ~]$vi .bash_profile

----改ORACLE_SID=orcl;

[oracle@localhost ~]$source .bash_profile

-----生效它

[root@localhost ~]# cd/u01/app/oracle/admin/orcl/pfile

[root@localhost pfile]# ls

init.ora.7252016194956    ----后面的数字可能不一样

[root@localhost pfile]# cpinit.ora.7252016194956 /u01/app/oracle/product/12.1.0/db_1/dbs

                   /inittesttest.ora

----替换它

[oracle@localhost ~]$sqlplus / as sysdba

SQL> startup

ORACLE instance started.

Total System Global Area 1660944384 bytes

Fixed Size                  2925072 bytes

Variable Size            1056968176 bytes

Database Buffers          587202560 bytes

Redo Buffers               13848576 bytes

Database mounted.

Database opened.

[oracle@localhost /]$ps -ef |grep ora_

oracle   3387     1  0 12:01 ?        00:00:00 ora_pmon_orcl

oracle   3389     1  0 12:01 ?        00:00:00 ora_psp0_orcl

oracle   3391     1  0 12:01 ?        00:00:00 ora_vktm_orcl

oracle   3395     1  0 12:01 ?        00:00:00 ora_gen0_orcl

oracle   3397     1  0 12:01 ?        00:00:00 ora_mman_orcl

oracle   3401     1  0 12:01 ?        00:00:00 ora_diag_orcl



查看状态命令:lsnrctl status

启动监听:lsnrctl start

关闭监听:lsnrctl stop

可以用IE打开了网址是:https://192.168.150.2:5500/em

 

在安装了oracle客户端的机器上的tnsnames.ora文件中加入下面这一段。

ORCL =

 (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = orcl.localdomain)

    )

  )

Oracle客户端网上到处有下载,windows平台下的,随便装一个,我用的是oracle10g 客户端,有图形界面



再下载一个高手都在用的PL/SQL DEVELOPER





看起来就很牛逼了。好了,开始学习ORACLE了。

祝大家安装顺利,好运!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle red hat vmware linux