三、安装数据库软件
# unzip -d /stage/ linux.x64_11gR2_database_1of2.zip# unzip -d /stage/ linux.x64_11gR2_database_2of2.zip# chown -R oracle.oinstall /stage/database# xhost +access control disabled, clients can connect from any host# su - oracle$ cd /stage/database/$ ./runInstaller 1.填写metalink邮箱账号,没有账号可不填(忽视警告) 2.只安装数据库软件 3.安装单实例数据库 4.选择支持的语言 5.选择企业版 6.设置安装路径 7.设置特权操作系统组 8.预安装检查 9.概述 10.开始安装 10.1 以root身份执行脚本 11.安装成功 |
四、创建监听
$ . oraenvORACLE_SID = [orcl] ? +ASMThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle$ netca |
五、创建数据库实例
$ . oraenvORACLE_SID = [+ASM] ? orclThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle$ dbca 设置数据库文件的存储类型为ASM,存储路径使用OMF:+DATA(也可以通过点击Browse选择+DATA) 输入ASM密码:oracle_4U 设置FRA存储路径:+FRA(也可以通过点击Browse选择+FRA) 保存数据库模版: 安装后的检查: # su - oracle$ . oraenvORACLE_SID = [orcl] ? +ASMThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora....up.type ONLINE ONLINE ora11g ora.FRA.dg ora....up.type ONLINE ONLINE ora11g ora....ER.lsnr ora....er.type ONLINE ONLINE ora11g ora.asm ora.asm.type ONLINE ONLINE ora11g ora.cssd ora.cssd.type ONLINE ONLINE ora11g ora.diskmon ora....on.type ONLINE ONLINE ora11g ora.orcl.db ora....se.type ONLINE ONLINE ora11g$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 13 21:49:34 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Automatic Storage Management optionSQL> select status from v$instance;STATUS------------------------------------STARTEDSQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Automatic Storage Management option[oracle@ora11g ~]$ . oraenvORACLE_SID = [+ASM] ? orclThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle[oracle@ora11g ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 13 21:50:45 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, Automatic Storage Management, OLAP, Data Miningand Real Application Testing optionsSQL> select status from v$instance;STATUS------------OPEN |