rh6安装oracle11g+ASM

安装步骤我这里略过,主要说下安装过程中遇到到问题或重要步骤:

1、UDEV绑定:

for i in b c d e ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
4块盘 sdb、sdc、sdd、sde

2、rh6 安装11.2.1.0版本执行root.sh报错解决(这个是11.2.1.0的bug Doc ID 1557677.1):
Today, someone in the QQ group asked this question ,hi configured Oracle Grid Infrastructure for a Standalone Server(11.2.0.1) on RHEL 6.4,Restarting the server Oracle-HAS not starts and shows the next OHAs error:

# crsctl start has
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.

# crsctl check has
CRS-4639: Could not contact Oracle High Availability Services

Cause
======================================
The root cause is because the Oracle Grid infrastructure 11.2.0.1 does not support REL 6,we can use the REL 6 compatible version 11.2.0.3 and higher

Solution
======================================
[grid@myrac1 ~]$ ps -ef | grep init.ohasd
grid 8203 3000 0 18:47 pts/0 00:00:00 grep init.ohasd

init.ohasd is used to control ohasd (which runs as a binary ‘ohasd.bin’).If init.ohasd is not running ohasd won’t be able to start.

cat /etc/inittab|grep init.ohasd

[grid@myrac1 has]$ cat /etc/inittab|grep init.ohasd
h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1

Manually start init.ohasd

#/etc/init.d/init.ohasd start
or
#/sbin/init q

# crsctl check has
CRS-4638: Oracle High Availability Services is online

Other ways:

In RHEL 6 inittab is no longer supported, it uses upstart insted.
See more info in page:http://searchenterpriselinux.techtarget.com/tip/RHEL-6-ditches-System-V-init-for-Upstart-What-Linux-admins-need-to-know

To solve the issue do the following:
Create the file:/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
After the file is created, reboot and Oracle should start normaly

or

Problem is indeed because of upstart/init incompatibility. Here is the working way:
1) Proceed with the installation as usual until root.sh invocation.
2) Before root.sh edit $GRID_HOME/crs/install/s_crsconfig_lib.pm, go to line 1173 (you should find a code like: if ($srv eq “ohasd”) { # Start OHASD).
3) Insert a following snippet before starting OHASD part (line 1173)

my $UPSTART_OHASD_SERVICE = "oracle-ohasd";
my $INITCTL = "/sbin/initctl";

($status, @output) = system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
if (0 != $status)
{
error ("Failed to start $UPSTART_OHASD_SERVICE, error: $!");
return $FAILED;
}
4) Create a file /etc/init/oracle-ohasd.conf with the following content inside

# Oracle OHASD startup

start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1
5) Invoke root.sh
6) Finish the installation.

If you previously ran root.sh (not successfully), simply roll it back:
$GRID_HOME/crs/install/roothas.pl -deconfig -force -verbose
Make changes above and continue.

Unsupported: 11.2.0.1/11.2.0.2 GI root.sh Fails on OL6/RHEL6 with ohasd failed to start: Inappropriate ioctl for device (Doc ID 1557677.1)

3、dbca安装oracle软件过程中找不到ASM磁盘,因为oracle文件权限不对,执行 chmod +s oracle 或chmod 6751 oracle解决
cd /u01/app/oracle/product/grid/bin
[grid@asmtest bin]$ ll oracle
-rwsrwsr-x 1 grid oinstall 203972923 Jun 14 22:20 oracle

主要是目录没规划好,导致后来去修改过目录权限。
安装GI时,记得不要把 $ORACLE_BASE与$ORACLE_HOME目录有父子目录关系。

上一篇:Cannot override the final method from SherlockFragmentActivity


下一篇:Linux环境下用户空间与内核空间数据的交换方式