文档章节

Oracle单实例asm安装步骤

ULink
 ULink
发布于 2016/12/25 21:59
字数 2275
阅读 39
收藏 0

 

 

安装环境

Vmware

操作系统Centos 6.5

                                                                                

 

 

groupadd -g 500 oinstall

 

创建用户及所属组

useradd -g oinstall -G dba,oper,asmdba oracle

useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid

 

创建目录文件

mkdir -p /u01/grid/product

mkdir -p /u01/app/product/db

chown -R grid:oinstall /u01

chown -R oracle:oinstall /u01/app

chmod -R 775 /u01

 

 

grid 账号环境变量配置

export ORACLE_BASE = /u01/grid

export ORACLE_HOME = $ORACLE_BASE/product

export ORACLE_SID =+ASM

export PATH = $ORACLE_HOME/bin:$PATH

 

 

oracle 账号环境变量配置

export ORACLE_BASE=/u01/app

export ORACLE_HOME=$ORACLE_BASE/product/db

export ORACLE_SID=orcl

export PATH=$ORACLE_HOME/bin:$PATH

 

 

修改系统参数

cp -p /etc/sysctl.conf /etc/sysctl.conf20161204

vim /etc/sysctl.conf

 

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

 

生效 sysctl -p 

 

 

设置Shell限制

 vi/etc/security/limits.conf

oracle  soft  nproc  2047

oracle  hard  nproc  16384

oracle  soft  nofile  1024

oracle  hard  nofile  65536

oracle  soft  stack  10240

 

grid  soft  nproc  2047

grid  hard  nproc  16384

grid  soft  nofile  1024

grid  hard  nofile  65536

grid  soft  stack  10240

 

 

vi/etc/pam.d/login

session  required  /lib/security/pam_limits.so

 

 

 

root@localhost ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0xc9a0d18a.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): b^H^C

[root@localhost ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x693a43b4.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1044, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044):

Using default value 1044

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

[root@localhost ~]# fdisk -l

 

Disk /dev/sda: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0002b59e

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64        3917    30944256   8e  Linux LVM

 

Disk /dev/sdb: 8589 MB, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x693a43b4

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1044     8385898+  83  Linux

 

Disk /dev/sdc: 8589 MB, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdd: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/mapper/vg_bogon-lv_root: 29.6 GB, 29569843200 bytes

255 heads, 63 sectors/track, 3594 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/mapper/vg_bogon-lv_swap: 2113 MB, 2113929216 bytes

255 heads, 63 sectors/track, 257 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

[root@localhost ~]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0xa55790e7.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1044, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044):

Using default value 1044

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

[root@localhost ~]# fdisk /dev/sdd

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0xa4e90e36.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-652, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652):

Using default value 652

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

 

[root@localhost ~]# raw

raw       raw2tiff  rawshark 

[root@localhost ~]# raw /dev/raw/raw1  /dev/sdb1

/dev/raw/raw1:                                                   bound to major 8, minor 17

[root@localhost ~]# raw /dev/raw/raw2  /dev/sdc1

/dev/raw/raw2:                                                   bound to major 8, minor 33

[root@localhost ~]# raw /dev/raw/raw3  /dev/sdd1

/dev/raw/raw3:                                                   bound to major 8, minor 49

[root@localhost ~]#

 

[root@localhost ~]# vim /etc/sysconfig/rawdevices

/dev/raw/raw1  /dev/sdb1

/dev/raw/raw2  /dev/sdc1

/dev/raw/raw3  /dev/sdd1

 

 

service rawdevices restart

 

 

 

/etc/init.d/oracleasm configure -i

 

 

 

 

 

root@localhost soft]# /etc/init.d/oracleasm configure -i

Configuring the Oracle ASM library driver.

 

This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

 

Default user to own the driver interface []: gei^H^H^C

[root@localhost soft]# /etc/init.d/oracleasm configure -i

Configuring the Oracle ASM library driver.

 

This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

 

Default user to own the driver interface []: grid

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver:                     [FAILED]

 

 

 

处理方式

 

关闭selinux

 

SELINUX=disabled

重启系统

 

 

 

 

 

 

 

 

 

[root@localhost ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1

Marking disk "VOL1" as an ASM disk:                        [  OK  ]

[root@localhost ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1

Marking disk "VOL2" as an ASM disk:                        [  OK  ]

[root@localhost ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1

Marking disk "VOL3" as an ASM disk:                        [  OK  ]

[root@localhost ~]#

 

 

 

[root@localhost ~]# /etc/init.d/oracleasm listdisks

VOL1

VOL2

VOL3

[root@localhost ~]#

 

 

[grid@localhost grid]$ ./runInstaller

[root@localhost ~]# /u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/oraInventory to oinstall.

The execution of the script is complete.

[root@localhost ~]# /u01/grid/product/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/grid/product

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/grid/product/crs/install/crsconfig_params

Creating trace directory

/u01/grid/product/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory

Failed to create keys in the OLR, rc = 127, Message:

  

 

Failed to create keys in the OLR at /u01/grid/product/crs/install/crsconfig_lib.pm line 7660.

/u01/grid/product/perl/bin

 

[root@localhost lib64]#  ln -s libcap.so.2.16 libcap.so.1          

 

[root@localhost lib64]# /u01/grid/product/root.sh

 

root@localhost lib64]#  ln -s libcap.so.2.16 libcap.so.1

[root@localhost lib64]# /u01/grid/product/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/grid/product

 

Enter 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 by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/grid/product/crs/install/crsconfig_params

Improper Oracle Grid Infrastructure configuration found on this host

Deconfigure the existing cluster configuration before starting

to configure a new Grid Infrastructure

run '/u01/grid/product/crs/install/roothas.pl -deconfig'

to configure existing failed configuration and then rerun root.sh

/u01/grid/product/perl/bin/perl -I/u01/grid/product/perl/lib -I/u01/grid/product/crs/install /u01/grid/product/crs/install/roothas.pl execution failed

[root@localhost lib64]#  /app/grid/grid11g/crs/install/roothas.pl -deconfig -force

-bash: /app/grid/grid11g/crs/install/roothas.pl: No such file or directory

[root@localhost lib64]# /u01/grid/product/crs/install/roothas.pl -deconfig -force

Using configuration parameter file: /u01/grid/product/crs/install/crsconfig_params

CRS-4639: Could not contact Oracle High Availability Services

CRS-4000: Command Stop failed, or completed with errors.

CRS-4639: Could not contact Oracle High Availability Services

CRS-4000: Command Delete failed, or completed with errors.

CRS-4544: Unable to connect to OHAS

CRS-4000: Command Stop failed, or completed with errors.

Failure in execution (rc=-1, 0, No such file or directory) for command /etc/init.d/ohasd deinstall

Successfully deconfigured Oracle Restart stack

[root@localhost lib64]#  /u01/grid/product/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/grid/product

 

Enter 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 by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/grid/product/crs/install/crsconfig_params

LOCAL ADD MODE

Creating OCR keys for user 'grid', privgrp 'oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4664: Node localhost successfully pinned.

Adding Clusterware entries to upstart

 

localhost     2016/12/05 02:58:49     /u01/grid/product/cdata/localhost/backup_20161205_025849.olr

Successfully configured Oracle Grid Infrastructure for a Standalone Server

[root@localhost lib64]#

[grid@localhost ~]$ crs_stat -t

Name           Type           Target    State     Host       

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

ora.DATA.dg    ora....up.type ONLINE    ONLINE    localhost  

ora.asm        ora.asm.type   ONLINE    ONLINE    localhost  

ora.cssd       ora.cssd.type  ONLINE    ONLINE    localhost  

ora.diskmon    ora....on.type OFFLINE   OFFLINE              

ora.evmd       ora.evm.type   ONLINE    ONLINE    localhost  

ora.ons        ora.ons.type   OFFLINE   OFFLINE              

[grid@localhost ~]$

 

 

 

[grid@localhost ~]$ srvctl status asm

ASM is running on localhost

[grid@localhost ~]$

 

 

 

 

 

 

 

 

 

 

 

 

Oracle   账号

 

 

 

 

[oracle@localhost database]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 10784 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 2002 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-05_03-14-18AM. Please wait ...[oracle@localhost database]$

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

© 著作权归作者所有

共有 人打赏支持
ULink
粉丝 5
博文 73
码字总数 18984
作品 0
济南
系统管理员
私信 提问
探索ORACLE之ASM02_安装

探索ORACLE之ASM02_安装 作者:吴伟龙 好了,现在开始谈谈有关于ASM安装的相关内容,ASM的安装必须建立在操作系统和数据库软件已经安装完成的及实例未创建之前来进行安装,之后再进行选择ASM...

晨曦之光
2012/04/25
248
0
RHEL + Oracle 11g + udev + ASM实验扩展

最近一段时间在刻苦的学习Oracle的体系结构等理论知识,在这里总结一些知识,以及自己在此做个实验扩展巩固最近所学的知识。 实验环境 Redhat Enterprise Linux 6.5 x86_64 IP地址:192.168...

Sound_
2017/05/24
0
0
Oracle Data Guard RAC到单机ASM配置(物理standby)

本次配置11G rac到单机ASM的dataguard配置,11G rac的安装参考oracle 11G rac 安装(VMware + rhel6.3),11G 单机ASM安装参考Oracle 11G 单机asm安装。 环境介绍: 主库: 11203 2节点RAC 实例...

sugar黑黑
2015/10/21
0
0
11gR2修改主机名导致CRS-0184以及CRS-4000的错误

我们通常都说,在部署Oracle数据库服务器前,要规划好主机名、IP地址等基础信息,一经确定,尤其是部署好Oracle数据库之后,就不要轻易修改主机名或者是IP地址等。而且我们也都知道这个理儿,...

rudy_gao
2014/04/28
0
0
Oracle 11g RAC到单实例ASM的物理Standby搭建

一、DG环境配置 此次搭建Standby的主库为:” RedHat 6.5+11G+RAC+ASM安装与配置(三节点)”,11g单实例ASM安装使用ASMLib的方式,不在使用UDEV方式,磁盘为本机磁盘,非远程挂载的磁盘。本次...

朱wei
2016/05/04
0
0

没有更多内容

加载失败,请刷新页面

加载更多

phpstorm xdebug 配置

xdebug方便了调试代码,比起一个一个地方的打印结果还是debug看的更明白下面介绍下maxOS系统下的debug配置 下载 https://xdebug.org/download.php 点击红线部分进入,粘贴phpinfo()信息推荐适...

被猪拱了的JAVA
30分钟前
2
0
Golang学习笔记(1)

基本知识 golang的文件格式以go结尾。 运行方式 go run main.go 用于开发调试使用 编译成二进制文件 go build main.go 会生成一个可执行的二进制文件 变量 变量定义的形式 Golang的变量定义有...

ExtreU
44分钟前
1
0
基于Kafka构建事件溯源模式的微服务

概要 本文中我们将讨论如何借助Kafka实现分布式消息管理,使用事件溯源(Event Sourcing)模式实现原子化数据处理,使用CQRS模式(Command-Query Responsibility Segregation )实现查询职责...

架构师springboot
51分钟前
2
0
git上传项目步骤

https://blog.csdn.net/m0_37725003/article/details/80904824

fame_yao
51分钟前
2
0
NOOBS自定义安装多系统

一、预置条件: 宿主系统是win10_x64 virtual box 虚拟机,安装了centos7 树莓派的系统安装工具:NOOBS_v2_9_0.zip,镜像文件 二、根据镜像文件生成boot.tar.xz 和root.tar.xz 1、设置共享目...

mbzhong
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部