oracle root脚本,11g R2 运行root.sh脚本不成功的一个例子:

在安装Oracle 11g R2集群时,遇到运行root.sh脚本不成功的情况,错误提示涉及SELINUX权限。通过检查并修改/etc/selinux/config和/etc/sysconfig/selinux文件,以及使用chcon命令改变文件的SELinux属性,最终成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

近日安装oracle 11g R2 集群时,在第1个节点运行root.sh脚本时没有成功。搞了一整天终于解决。记录一下:

1.---运行root.sh脚本

[root@lir-rac1 install]# /u01/app/11.2.0.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.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.

2010-05-18 10:57:09: Parsing the host name

2010-05-18 10:57:09: Checking for super user privileges

2010-05-18 10:57:09: User has super user privileges

Using configuration parameter file: /u01/app/11.2.0.0/grid/crs/install/crsconfig_params

/u01/app/11.2.0.0/grid/bin/ocrconfig.bin: error while loading shared libraries: /u01/app/11.2.0.0/grid/lib/libclntsh.so.11.1:

cannot restore segment prot after reloc: Permission denied

Command return code of 127 (32512) from command: /u01/app/11.2.0.0/grid/bin/ocrconfig -local -upgrade grid oinstall

Failed to create or upgrade OLR

2.-----------------------------------------------------

网上查找资料cannot restore segment prot after reloc: Permission denied

说是SELINUX 的原因,检查/etc/selinux/config 文件后,发现是有问题,想起来这个机器单独装过(选择文本方式的操作系统),可能和之前其它节点的设置不同了。

[root@lir-rac1 install]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - SELinux is fully disabled.

#SELINUX=enforcing

SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:

#       targeted - Only targeted network daemons are protected.

#       strict - Full SELinux protection.

SELINUXTYPE=targeted

----这个文件也要检查。

[root@lir-rac1 install]# vi /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - SELinux is fully disabled.

#SELINUX=enforcing

SELINUX=disabled

# SELINUXTYPE= type of policy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值