之前在安装Grid的时候遇到了一个问题
在前面的步骤都成功做完来到这一步的时候,要求执行两个脚本
执行第一个脚本没啥问题
但在第二个文件时候报了错误
[grid@14oracle16 /]# /u01/sys_software/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are setas:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root.shscript.
Now product-specific root actions will beperformed.
2012-06-27 10:31:18: Parsing the host name
2012-06-27 10:31:18: Checking for superuser privileges
2012-06-27 10:31:18: User has super userprivileges
Using configuration parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp'root'..
Operation successful.
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pawallet
peer wallet keys
pawallet keys
peer cert request
pacert request
peer cert
pacert
peer root cert TP
profile reader root cert TP
paroot cert TP
peer pa cert TP
papeer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pauser cert
Adding daemon to inittab
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at/u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.
通过上网查找发现是因为改Grid的版本,有bug
解决方法如下:
因为之前以及运行过一次脚本
所以先要删除节点
[grid@14oracle16 /]$ cd u01/app/oracle/product/11.2.0/grid/crs/install
[grid@14oracle16 install]$ ./roothas.pl -delete -force -verbose
2016-05-27 05:36:01: Checking for super user privileges
You must be logged in as root to run this script.
2016-05-27 05:36:01: ###### Begin Error Stack Trace ######
2016-05-27 05:36:01: Package File Line Calling
2016-05-27 05:36:01: --------------- -------------------- ---- ----------
2016-05-27 05:36:01: 1: crsconfig_lib s_crsconfig_lib.pm 121 crsconfig_lib::error
2016-05-27 05:36:01: 2: crsconfig_lib crsconfig_lib.pm 856 crsconfig_lib::s_check_SuperUser
2016-05-27 05:36:01: 3: main roothas.pl 173 crsconfig_lib::check_SuperUser
2016-05-27 05:36:01: ####### End Error Stack Trace #######
Log in as root and rerun this script.
2016-05-27 05:36:01: ###### Begin Error Stack Trace ######
2016-05-27 05:36:01: Package File Line Calling
2016-05-27 05:36:01: --------------- -------------------- ---- ----------
2016-05-27 05:36:01: 1: crsconfig_lib s_crsconfig_lib.pm 122 crsconfig_lib::error
2016-05-27 05:36:01: 2: crsconfig_lib crsconfig_lib.pm 856 crsconfig_lib::s_check_SuperUser
2016-05-27 05:36:01: 3: main roothas.pl 173 crsconfig_lib::check_SuperUser
2016-05-27 05:36:01: ####### End Error Stack Trace #######
2016-05-27 05:36:01: Not running as authorized user
Insufficient privileges to execute this script
2016-05-27 05:36:01: ###### Begin Error Stack Trace ######
2016-05-27 05:36:01: Package File Line Calling
2016-05-27 05:36:01: --------------- -------------------- ---- ----------
2016-05-27 05:36:01: 1: main roothas.pl 175 crsconfig_lib::error
2016-05-27 05:36:01: ####### End Error Stack Trace #######
再重新运行
[grid@14oracle16 /]# /u01/sys_software/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are setas:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root.shscript.
Now product-specific root actions will beperformed.
2012-06-27 10:31:18: Parsing the host name
2012-06-27 10:31:18: Checking for superuser privileges
2012-06-27 10:31:18: User has super userprivileges
Using configuration parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
在此处会有停顿,此时要马上开另一个终端用root用户运行以下命令
dd if=/var/tmp/.oracle/npohasd of=/dev/nullbs=1024 count=1
之后就能运行成功啦
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31386161/viewspace-2132131/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31386161/viewspace-2132131/