ASM磁盘组创建Grid Infrastructure 12安装图解(三)

来源:互联网 发布:yurisa知乎 编辑:程序博客网 时间:2024/04/30 04:06

装ASM和grid Infrastructure 12C

相关软件的信息如下

名称

版本号

RedHat 

rhel-server-6.7-x86_64-dvd

Oracle VM VirtualBox

5.0.2

Grid Infrastructure

12.1.0.2

Oracle Database 12C

12.1.0.2


1、安装完毕后就是GI的验证和使用了,这台主机之前已经安装了Oracle database 12C

2、此次我们配置的是Stand-Alone Server在上一章里执行root.sh的时候有如下脚本,如果不小心关了重新执行下root.sh脚本即可看到提示

[oracle@12C grid]$ sudo ./root.sh[sudo] password for oracle: Performing root user operation.The following environment variables are set as:    ORACLE_OWNER= oracle    ORACLE_HOME=  /u01/app/12.1.0/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite.The contents of "oraenv" have not changed. No need to overwrite.The contents of "coraenv" have not changed. No need to overwrite.Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:/u01/app/12.1.0/grid/perl/bin/perl -I/u01/app/12.1.0/grid/perl/lib -I/u01/app/12.1.0/grid/crs/install /u01/app/12.1.0/grid/crs/install/roothas.plTo configure Grid Infrastructure for a Cluster execute the following command as oracle user:/u01/app/12.1.0/grid/crs/config/config.shThis 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.

3、使用root执行如下命令


4、更新下GI的oraInventory目录

[oracle@12C bin]$ /u01/app/12.1.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.1.0/grid -defaultHomeName正在启动 Oracle Universal Installer...检查交换空间: 必须大于 500 MB。   实际为 3959 MB    通过The inventory pointer is located at /etc/oraInst.loc'UpdateNodeList' 成功。

5、将我们本机的Oracle Database 加入GI

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl add database -d PROD1 -o /u01/app/oracle/product/12.1.0/dbhome_1/ -s open -t immediate -y manual
6、查看下加入后的状态

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl config database -d PROD1数据库唯一名称: PROD1数据库名: Oracle 主目录: /u01/app/oracle/product/12.1.0/dbhome_1/Oracle 用户: oracleSpfile: 口令文件: 域: 启动选项: open停止选项: immediate数据库角色: PRIMARY管理策略: MANUAL磁盘组: 服务: OSDBA 组: OSOPER 组: 数据库实例: PROD1[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl status database -d PROD1数据库未运行。

7、加入listener,注意要保持监听关闭的情况下添加,否则会报端口占用的错误,当然加入时加入force参数也是可以加成功的,但是不建议这么做

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl add listener -l listener -o /u01/app/oracle/product/12.1.0/dbhome_1/

8、查看下是否添加成功

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl status listener监听程序 LISTENER 已启用监听程序 LISTENER 未运行[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl config listener名称: LISTENER类型: Database Listener主目录: /u01/app/oracle/product/12.1.0/dbhome_1/端点: TCP:1521监听程序已启用。
9、加入listener

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/srvctl add asm -l listener

10、查看目前加入的服务

[oracle@12C ~]$ /u01/app/12.1.0/grid/bin/crsctl status res -t--------------------------------------------------------------------------------Name           Target  State        Server                   State details       --------------------------------------------------------------------------------Local Resources--------------------------------------------------------------------------------ora.LISTENER.lsnr               OFFLINE OFFLINE      12c                      STABLEora.asm               OFFLINE OFFLINE      12c                      STABLEora.ons               OFFLINE OFFLINE      12c                      STABLE--------------------------------------------------------------------------------Cluster Resources--------------------------------------------------------------------------------ora.cssd      1        OFFLINE OFFLINE                               STABLEora.diskmon      1        OFFLINE OFFLINE                               STABLEora.evmd      1        ONLINE  ONLINE       12c                      STABLEora.prod1.db      1        OFFLINE OFFLINE                               STABLE--------------------------------------------------------------------------------
11、修改启动参数asm_diskstring

[oracle@12C dbs]$ vi /u01/app/12.1.0/grid/dbs/init+ASM.oraasm_diskstring='/dev/oracleasm/disks*'

12、启动ASM,检查相关服务是否启动

[oracle@12C dbs]$ . oraenvORACLE_SID = [+ASM] ? ORACLE_HOME = [/home/oracle] ? /u01/app/12.1.0/grid The Oracle base remains unchanged with value /u01/app/grid[oracle@12C 桌面]$ srvctl start asm[oracle@12C 桌面]$ srvctl start database -d PROD1[oracle@12C 桌面]$ crsctl status res -t--------------------------------------------------------------------------------Name           Target  State        Server                   State details       --------------------------------------------------------------------------------Local Resources--------------------------------------------------------------------------------ora.DATA.dg               OFFLINE OFFLINE      12c                      STABLEora.LISTENER.lsnr               ONLINE  ONLINE       12c                      STABLEora.asm               ONLINE  ONLINE       12c                      Started,STABLEora.ons               OFFLINE OFFLINE      12c                      STABLE--------------------------------------------------------------------------------Cluster Resources--------------------------------------------------------------------------------ora.cssd      1        ONLINE  ONLINE       12c                      STABLEora.diskmon      1        OFFLINE OFFLINE                               STABLEora.evmd      1        ONLINE  ONLINE       12c                      STABLEora.prod1.db      1        ONLINE  ONLINE       12c                      Open,STABLE--------------------------------------------------------------------------------

13、使用asmca 命令或者手工创建命令创建磁盘组

[oracle@12C dbs]$ asmca


14、查看磁盘组信息

[oracle@12C dbs]$ srvctl status diskgroup -g data磁盘组 data 正在 12c 上运行

整个安装管理完毕。




0 0
原创粉丝点击