OEL6.1+Grid Infrastructure + ASM配置

混了这么久,发一篇OEL6.1+Grid Infrastructure + ASM配置
http://www.itpub.net/thread-1480563-1-1.html

也不知道这样的文章这个板块有没有,反正这个是新鲜出炉的,刚做好,就发上来了,大家有兴趣就看看吧:
所有的“冒号+O” 都显示成了一个图片,自己改吧
环境:oracle linux 6.1 x64 Vmware 7.0
数据库:oracle 11G R2
目的:单机测试OEL在没有asmlib下能不能做ASM。非RAC,以后我会继续我的测试
OEL 6.1 + Grid Infrastructure + ASM配置
环境变量设置:
用户:
相对于oracle数据库的安装增加了几个用户组
/usr/sbin/groupadd -g 502 oper
/usr/sbin/groupadd -g 600 asmadmin
/usr/sbin/groupadd -g 601 asmoper
/usr/sbin/groupadd -g 602 asmdba
新的oracle用户多了一个grid
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid
如果我们已经有了oracle用户,可以修改/etc/group来讲oracle重新添加到新组中。(注意逗号)
oinstall:x:500:oracle,grid  dba:x:501:oracle,grid  oper:x:502:oracle  asmadmin:x:600:grid  asmoper:x:601:grid
asmdba:x:602:oracle,grid
在/home/grid/.bash_profile中添加一下信息
export ORACLE_HOSTNAME=11G
export ORACLE_SID=+ASM
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/grid
export ORACLE_TERM=xterm
export TMP=/tmp
export TMPDIR=$TMP
PATH=$PATH:$HOME/bin
export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 
#下面这几句其实可以防在/etc/profile下跟oracle安装公用
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
        umask 022
fi
# mkdir /oracle/grid
# chown grid:oinstall -R grid/
然后vi /etc/security/limits.conf添加如下行:
grid                 soft    nproc   2047
grid                 hard    nproc   16384
grid                 soft    nofile   1024
grid                 hard    nofile  65536
gird时间同步所需要的设置
#/sbin/service ntpd stop
#chkconfig ntpd off
#cp /etc/ntp.conf /etc/ntp.conf.orgi
修改下版本检测,也不是必要的,因为如果没有使用ACFS的话,后面会有一个提示,估计是版本不被识别,本次安装没有改动这个文件。
#vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5.0 (Tikanga)
以grid用户进入安装(安装需要5.5GB容量),跳过升级提示,安装选项有4个,第一个是集群安装,第二个是将Grid Infrastructure做为一个server,第三个是升级Grid Infrastructure,第四个是只安装Grid Infrastructure软件,我们选择第二个。
马上进入的是ASM配置,这里看到了熟悉的raw出现在可用磁盘,OEL6.1的asmlib已经不能随意下载了,ASM要采用裸设备方式实现,太好了。
在下一个画面权限选项中从上倒下依次是asmdba,asmoper,asmadmin。
安装校验的时候还是提示pdksh包错误,忽略。
进入安装进程画面,进度条76%提示执行脚本/oracle/grid/root.sh。这里会提示错误,解决在下面。
因为oracle是用的asm,所以会自动添加css实例。
提示一个错误:
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: 
2011-09-04 22:51:48.579
[client(9975)]CRS-2101:The OLR was formatted using version 3.
2011-09-04 22:51:51.270
[client(9998)]CRS-1001:The OCR was formatted using version 3.
[client(10034)]CRS-10001:CRS-6021: No msg for has:crs-6021 [l][unlimited]
[client(10035)]CRS-10001:CRS-6021: No msg for has:crs-6021 [n][65536]
ohasd failed to start at /oracle/grid/crs/install/roothas.pl line 325.
/oracle/grid/perl/bin/perl -I/oracle/grid/perl/lib -I/oracle/grid/crs/install /oracle/grid/crs/install/roothas.pl execution failed
Oracle解释是以下这个文件无法读取造成的,所以要新开一个terminal执行命令:
dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
如果出现了提示,那么修复这个错误提示要先执行/oracle/grid/crs/install/rootcrs.pl –deconfig –force,将刚才的root.sh回退,然后再执行dd命令。 或者已知道的会出现错误情况提前在执行脚本等待的时候重新开一个terminal执行上面的dd命令。(root用户)
特别注意:(或者已知道的会出现错误情况提前在执行脚本等待的时候重新开一个terminal执行上面的dd命令)
 这时候正确安装的脚本类似下面的提示:
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: /oracle/grid/crs/install/crsconfig_params
Creating trace directory
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 11g successfully pinned.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'error: file /etc/SuSE-release: No such file or directory'
11g     2011/09/05 21:19:43     /oracle/grid/cdata/11g/backup_20110905_211943.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
上面的ACFS-9459因为我们用的OEL6.1不能被识别,并且我们也没有使用ACFS文件系统,所以这个错误可以忽略。
回到安装图形界面,点击OK,安装继续并且配置监听和ASM。最后提示安装成功没有出现错误了。
点击close,reboot系统后用grid用户验证一下asm是否安装成功吧。
[grid@11G ~]$ ps -ef | grep ohasd
grid      2021     1  0 21:37 ?        00:00:00 /oracle/grid/bin/ohasd.bin reboot
$ asmcmd –p
ASMCMD [+]>startup
asm启动提示错误:
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
这个问题的出现其实跟上面安装的错误时一样的,只有先执行dd然后再手动启动has就解决了,但是不能每次都这样啊。
其实问题可以这样解决:
#vi /etc/init/init-oracle.conf
#start oracle
start on runlevel [0123456]
stop on runlevel [016]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
注释掉/etc/inittab中的init.ohasd run 项目。保证 /etc/sysconfig/firstboot中RUN_FIRSTBOOT=NO。
文件创建以后重新启动,那么服务就会启动正常了。
问题的解释是:RHEL 6 ditches System V init for Upstart: What Linux admins need to know
With the release of Red Hat Enterprise Linux (RHEL) 6, Red Hat will use the new Upstart boot service, as a replacement for the old init. In this article you'll learn about the changes to this essential Linux process, and what it means for your work as an administrator.
The disadvantage of the old System V init boot procedure is that it was based on runlevel directories that contained massive amounts of scripts that all had to be started. Upstart is event driven, so it contains scripts that are only activated when they are needed, making the boot procedure a lot faster. A well-tuned Linux server that uses Upstart boots significantly faster than an old system using System V init.
再次重新启动后测试一下asm是否正常。
[root@11G ~]# ps -ef | grep css
grid      2263     1  0 22:14 ?        00:00:00 /oracle/grid/bin/cssdagent
grid      2290     1  1 22:14 ?        00:00:00 /oracle/grid/bin/ocssd.bin 
root      2382  2313  0 22:14 pts/0    00:00:00 grep css
[root@11G ~]# ps -ef | grep d.bin
grid      2034     1  1 22:13 ?        00:00:01 /oracle/grid/bin/ohasd.bin reboot
grid      2184     1  1 22:13 ?        00:00:00 /oracle/grid/bin/oraagent.bin
grid      2200     1  0 22:13 ?        00:00:00 /oracle/grid/bin/evmd.bin
grid      2203     1  0 22:13 ?        00:00:00 /oracle/grid/bin/tnslsnr LISTENER -inherit
grid      2231  2200  0 22:13 ?        00:00:00 /oracle/grid/bin/evmlogger.bin -o /oracle/grid/evm/log/evmlogger.info -l /oracle/grid/evm/log/evmlogger.log
grid      2263     1  0 22:14 ?        00:00:00 /oracle/grid/bin/cssdagent
grid      2265     1  0 22:14 ?        00:00:00 /oracle/grid/bin/orarootagent.bin
grid      2287     1  0 22:14 ?        00:00:00 /oracle/grid/bin/diskmon.bin -d -f
grid      2290     1  1 22:14 ?        00:00:00 /oracle/grid/bin/ocssd.bin 
root      2424  2313  0 22:14 pts/0    00:00:00 grep d.bin
[root@11G ~]# ps -ef | grep asm
grid      2390     1  0 22:14 ?        00:00:00 asm_pmon_+ASM
grid      2392     1  1 22:14 ?        00:00:00 asm_psp0_+ASM
grid      2394     1  1 22:14 ?        00:00:00 asm_vktm_+ASM
grid      2398     1  0 22:14 ?        00:00:00 asm_gen0_+ASM
grid      2400     1  0 22:14 ?        00:00:00 asm_diag_+ASM
grid      2402     1  0 22:14 ?        00:00:00 asm_dia0_+ASM
grid      2404     1  0 22:14 ?        00:00:00 asm_mman_+ASM
grid      2406     1  1 22:14 ?        00:00:00 asm_dbw0_+ASM
grid      2408     1  0 22:14 ?        00:00:00 asm_lgwr_+ASM
grid      2410     1  0 22:14 ?        00:00:00 asm_ckpt_+ASM
grid      2412     1  0 22:14 ?        00:00:00 asm_smon_+ASM
grid      2414     1  1 22:14 ?        00:00:00 asm_rbal_+ASM
grid      2416     1  1 22:14 ?        00:00:00 asm_gmon_+ASM
grid      2418     1  0 22:14 ?        00:00:00 asm_mmon_+ASM
grid      2420     1  0 22:14 ?        00:00:00 asm_mmnl_+ASM
root      2445  2313  0 22:14 pts/0    00:00:00 grep asm
$ asmcmd –p
ASMCMD [+data/asm/asmparameterfile] > ls
REGISTRY.253.761088571
没有问题,可以使用,下面就是安装oracle软件和建立数据库了。安装没有太多问题不再复述。
卸载Grid Infrastructure用命令
# /oracle/grid/deinstall/deinstall



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值