Linux平台Oracle 11g单实例 + ASM存储 安装部署 快速参(2)

This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

8.根据上步执行的脚本输出提示,确定单节点需要root用户执行下面的命令

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

/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl

9.使用asmca创建ASM 磁盘组

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

Xmanager软件用grid用户登录

$asmca

10.安装oralce软件

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

#cd /u01/tmp/

#unzip p13390677_112040_Linux-x86-64_1of7.zip;unzip p13390677_112040_Linux-x86-64_2of7.zip

#chown -R oracle:oinstall database

Xmanager软件用oracle用户登录

$cd /u01/tmp/database/

$./runInstaller

图形界面安装,最后root用户执行一个脚本

#/u01/app/oracle/product/11.2.0/db_1/root.sh

11.创建数据库

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

Xmanager软件用oracle用户登录

$dbca

图形界面建库,Storage Type选择ASM,+DATA1磁盘组,数据库字符集根据实际情况选择。

12.使用grid用户创建监听

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

Xmanager软件用grid用户登录

$netca

13.客户端测试数据库连接

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

ping IP地址

tnsping IP地址

sqlplus system/oracle@IP地址/jyzhao

14.由于lv的权限在重启后会变回root用户,需要添加开机启动脚本

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

vi /etc/rc.d/rc.local

chown grid:asmadmin /dev/mapper/ora*

创建rc.local的链接文件

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc1.d/S999rc.local &&

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc2.d/S999rc.local &&

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc3.d/S999rc.local &&

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc4.d/S999rc.local &&

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc5.d/S999rc.local &&

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc6.d/S999rc.local

15.重启测试

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

15.1 关闭数据库

# su - oracle

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 12 14:14:38 2015

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

15.2 关闭has

$ su - grid

Password:

$ crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'jy-db'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'jy-db'

CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'jy-db'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'jy-db' succeeded

CRS-2677: Stop of 'ora.DATA1.dg' on 'jy-db' succeeded

CRS-2679: Attempting to clean 'ora.DATA1.dg' on 'jy-db'

CRS-2681: Clean of 'ora.DATA1.dg' on 'jy-db' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'jy-db'

CRS-2677: Stop of 'ora.asm' on 'jy-db' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'jy-db'

CRS-2677: Stop of 'ora.cssd' on 'jy-db' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on 'jy-db'

CRS-2677: Stop of 'ora.evmd' on 'jy-db' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'jy-db' has completed

CRS-4133: Oracle High Availability Services has been stopped.

15.3 重启主机

# sync

# sync

# sync

# shutdown -Fr now

Broadcast message from root@JY-DB

(/dev/pts/0) at 14:20 ...

The system is going down for reboot NOW!

15.4主机启动后,查看crs状态

# /u01/app/11.2.0/grid/bin/crsctl stat res -t

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

NAME          TARGET  STATE        SERVER                  STATE_DETAILS     

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

Local Resources

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

ora.DATA1.dg

ONLINE  ONLINE      jy-db                                     

ora.LISTENER.lsnr

ONLINE  ONLINE      jy-db                                     

ora.asm

ONLINE  ONLINE      jy-db                    Started           

ora.ons

OFFLINE OFFLINE      jy-db                                       

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

Cluster Resources

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

ora.cssd

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/8254b547a292478431a8356cf530c3cb.html