ASM的安装配置

一、首先创建需要的用户和用户组,以及配置环境变量

使用root用户执行:
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /opt/app/oracle/product/11.2.0/dbhome_1/
mkdir -p /opt/app/oracle/grid/product/11.2.0/grid
chown -R oracle:oinstall /opt/app
chown -R grid.oinstall /opt/app/oracle/grid
chomod -R 775 /opt
[grid@oracle ~]$ vi .bash_profile 添加以下内容
#ORACLE_11G
ORACLE_BASE=/opt/app/grid
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
ORACLE_SID=+ASM
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
#end

二、检查一下linux操作系统的版本
[root@oracle ~]# lsb_release -a
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release:        5.4
Codename:       Tikanga
[root@oracle ~]# uname -rm
2.6.18-194.el5 x86_64
然后到oracle官网去下载相应的asm rpm包,链接地址:http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html 
根据本机的配置,需要下载并安装如下3个rpm包:
[root@oracle tmp]# ls -l *.rpm
-rwxrw-rw- 1 root root 137637 Dec  1 01:19 oracleasm-2.6.18-194.11.4.el5-2.0.5-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root  14176 Dec  1 01:17 oracleasmlib-2.0.4-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root  90225 Dec  1 01:17 oracleasm-support-2.1.8-1.el5.x86_64.rpm


[root@oracle tmp]#rpm -ivh oracleasm* 
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%] 
1:oracleasm-support ########################################### [ 33%] 
2:oracleasm-2.6.18-194.el####################################### [ 67%] 
3:oracleasmlib ###############################################[100%]


三、配置ASMlib,再使用ASMlib之前,必须运行配置脚本准备驱动程序:
[root@oracle tmp]# /etc/init.d/oracleasm configure
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 []: oracle
Default group to own the driver interface []: dba
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:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]


[root@oracle tmp]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
root@oracle tmp]#/fdisk /dev/sdb


Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. 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)


Command (m for help): p


Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks   Id  System


Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522): 
Using default value 522


Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.
然后再对sdc分区
[root@oracle tmp]# partprobe
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb
Marking disk "vol1" as an ASM disk:                        [  OK  ]
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol2 /dev/sdc
五、安装grid

grid地址http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html








 
检查依赖关系,有些可以通过grid自带脚本修复,点下面的fix&Check Again,他会提示你跑某个脚本去修复。
例如 CVU_11.2.0.1.0_grid/runfixup.sh这个脚本修复
[root@oracle CVU_11.2.0.1.0_grid]# ./CVU_11.2.0.1.0_grid/runfixup.sh
 

安装
 
安装到76%时 ,需要root跑脚本,成功后,基本上过一会就安装完成了
 

[root@oracle CVU_11.2.0.1.0_grid]# sh /opt/app/oracle/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...


The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /opt/app/oracle/grid/product/11.2.0/grid


Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:


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.sh script.
Now product-specific root actions will be performed.
2015-12-01 22:32:13: Checking for super user privileges
2015-12-01 22:32:13: User has super user privileges
2015-12-01 22:32:13: Parsing the host name
Using configuration parameter file: /opt/app/oracle/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting


oracle     2015/12/01 22:32:54     /opt/app/oracle/grid/product/11.2.0/grid/cdata/oracle/backup_20151201_223254.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 3039 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oracle/oraInventory
'UpdateNodeList' was successful.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27500440/viewspace-1852592/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27500440/viewspace-1852592/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值