ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Linux操作系统下Oracle11g R2 RAC 安装配置教程
Oracle数据库培训-备份恢复-性能优化-集群容灾
Oracle数据库DBA高级工程师培训视频

oracle asm安装配置

内容发布:科比之圣| 发布时间:2017-5-9 10:46:35
一、安装ASM之前,首先要检查一下linux操作系统的版本
[root@yft ~# lsb_release -aLSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarchDistributor ID:    RedHatEnterpriseServerDescription:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)Release:    5.4Codename:    Tikanga
[root@yft ~# uname -rm2.6.18-164.el5 i686
此时可以到oracle官网去下载相应的rpm包,链接地址:http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html

根据本机的配置,需要下载并安装如下3个rpm包:
[url=][/url]
[root@yft 1234# lsoracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpmoracleasmlib-2.0.4-1.el5.i386.rpmoracleasm-support-2.1.7-1.el5.i386.rpm[root@yft 1234# rpm -ivh oracleasm*warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159Preparing...                ########################################### [100%   1:oracleasm-support      ########################################### [ 33%   2:oracleasm-2.6.18-164.el########################################### [ 67%   3:oracleasmlib           ########################################### [100%[url=][/url]

二、配置ASMlib,再使用ASMlib之前,必须运行配置脚本准备驱动程序:
使用root执行:/etc/init.d/oracleasm configure
[url=][/url]
[root@yft 1234# /etc/init.d/oracleasm configureConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver.  The following questions will determine whether the driver isloaded on boot and what permissions it will have.  The current valueswill be shown in brackets ('[]').  Hitting <ENTER> without typing ananswer will keep that current value.  Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (y/n) [n: yScan for Oracle ASM disks on boot (y/n) [y: yWriting Oracle ASM library driver configuration: doneInitializing the Oracle ASMLib driver:                     [  OK  Scanning the system for Oracle ASMLib disks:               [  OK  [root@yft 1234# /etc/init.d/oracleasm enableWriting Oracle ASM library driver configuration: doneInitializing the Oracle ASMLib driver:                     [  OK  Scanning the system for Oracle ASMLib disks:               [  OK  [url=][/url]

三、配置ASM磁盘:
[url=][/url]
[root@yft 1234# fdisk /dev/sdfDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): pDisk /dev/sdf: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  SystemCommand (m for help): nCommand action   e   extended   p   primary partition (1-4)pPartition number (1-4): 1First cylinder (1-522, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-522, default 522): Using default value 522Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[root@yft 1234]# partprobe[root@yft 1234]# /etc/init.d/oracleasm createdisk vol1 /dev/sdf1Marking disk "vol1" as an ASM disk:                        [  OK  ][url=][/url]

四、创建需要的用户和用户组:
使用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 /u01/app/oracle/product/11.2.0/dbhome_1
mkdir -p /u01/app/oracle/grid/product/11.2.0/grid
chown -R oracle:oinstall /u01/app/
chown -R grid:oinstall /u01/app/grid
chomod -R 775 /u01
[url=][/url]
1 [oracle@yft ~$ vi .bash_profile 2 3 if [ -f ~/.bashrc ; then 4         . ~/.bashrc 5 fi 6 7 # User specific environment and startup programs 8 9 PATH=$PATH:$HOME/bin10 11 export PATH12 #13 #ORACLE_11G 14 ORACLE_BASE=/u01/app/oracle15 ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_116 ORACLE_SID=yft17 PATH=$PATH:$ORACLE_HOME/bin18 export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH19 #end20 21 [grid@yft ~$ view .bash_profile 22 23 # .bash_profile24 25 # Get the aliases and functions26 if [ -f ~/.bashrc ; then27         . ~/.bashrc28 fi29 # .bash_profile30 31 # Get the aliases and functions32 if [ -f ~/.bashrc ; then33         . ~/.bashrc34 fi35 36 # User specific environment and startup programs37 38 PATH=$PATH:$HOME/bin39 40 export PATH41 42 #ORACLE_11G43 ORACLE_BASE=/u01/app/grid44 ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid45 ORACLE_SID=+ASM46 PATH=$PATH:$ORACLE_HOME/bin47 export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH48 #end[url=][/url]

五、配置grid infrastructure:
[url=][/url]
[grid@yft u01$ cd grid/[grid@yft grid$ lsdoc      response  runcluvfy.sh  sshsetup  welcome.htmlinstall  rpm       runInstaller  stage[grid@yft grid$ ./runInstaller Starting Oracle Universal Installer...Checking Temp space: must be greater than 80 MB.   Actual 1031 MB    PassedChecking swap space: must be greater than 150 MB.   Actual 2047 MB    PassedChecking monitor: must be configured to display at least 256 colors.    Actual 16777216    PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2013-03-20_10-36-24PM. Please wait ...[url=][/url]

安装顺带配置ASM,当然也可以选最后一个只安装软件,随后手工配置(具体请自行查看文档):
ASM磁盘配置正常的话会直接显示下面的内容:
Oracle会要求密码强度,当然可以忽略过去,这里使用Oracle1234:
下面选择组的话可以保持默认:
需要配置1.5G以上物理内存:
最后确认安装:
在76%处会卡住属于正常,随机会跳出下面的画面,使用root用户运行一下就可以了:

[url=][/url]
[root@yft 1234# /u01/app/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=  /u01/app/grid/product/11.2.0/gridEnter 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: nThe file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n: nThe file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n: nEntries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.2013-03-20 23:11:13: Checking for super user privileges2013-03-20 23:11:13: User has super user privileges2013-03-20 23:11:13: Parsing the host nameUsing configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'..Operation successful.CRS-4664: Node yft successfully pinned.Adding daemon to inittabCRS-4123: Oracle High Availability Services has been started.ohasd is startingyft     2013/03/20 23:12:30     /u01/app/grid/product/11.2.0/grid/cdata/yft/backup_20130320_231230.olrSuccessfully configured Oracle Grid Infrastructure for a Standalone ServerUpdating inventory properties for clusterwareStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB.   Actual 1816 MB    PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory'UpdateNodeList' was successful.[url=][/url]

[url=][/url]
[grid@yft ~$ sqlplus /nologSQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 21 16:00:41 2013Copyright (c) 1982, 2009, Oracle.  All rights reserved.SQL> conn /as sysdbaConnected.SQL> select name,state from v$asm_diskgroup;NAME                   STATE------------------------------ -----------DATA                   MOUNTED




上一篇:oracle用plsql登陆出错,提示ORA-12170:TNS:链接超时
下一篇:ORACLE启动监听器 The listener supports no services 问题解决方法
回复

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表