安装11.2.0.1的时候执行root.sh报错

安装11.2.0.1的时候报错:
[root@rac1 ~]# /u01/app/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/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
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.
2016-01-10 14:30:55: Parsing the host name
2016-01-10 14:30:55: Checking for super user privileges
2016-01-10 14:30:55: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
/u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR, rc = 127, 32512
OLR configuration failed

根据以往经验解决:
ln -s /lib64/libcap.so.2.16 /lib64/libcap.so.1
报错:
[root@rac1 ~]# /u01/app/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/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]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

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.
2016-01-10 14:37:39: Parsing the host name
2016-01-10 14:37:39: Checking for super user privileges
2016-01-10 14:37:39: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Improper Oracle Clusterware configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Clusterware
run '/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig'
to configure existing failed configuration and then rerun root.sh

根据提示执行:
[root@rac1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig
2016-01-10 14:39:16: Parsing the host name
2016-01-10 14:39:16: Checking for super user privileges
2016-01-10 14:39:16: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Oracle Clusterware stack is not active on this node
Restart the clusterware stack (use /u01/app/11.2.0/grid/bin/crsctl start crs) and retry
Failed to verify resources

继续:
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl start crs
Failure at scls_scr_setval with code 8
Internal Error Information:
  Category: -2
 Operation: failed
  Location: scrsearch3
  Other: id doesnt exist scls_scr_setval
  System Dependent Information: 2

CRS-4000: Command Start failed, or completed with errors.

怀疑是因为多次执行root.sh

回退root.sh
/u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose

执行成功!
[root@rac1 deinstall]# /u01/app/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/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]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

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.
2016-01-10 15:08:57: Parsing the host name
2016-01-10 15:08:57: Checking for super user privileges
2016-01-10 15:08:57: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
  root wallet
  root wallet cert
  root cert export

你可能感兴趣的:(安装11.2.0.1的时候执行root.sh报错)