ITPub博客

首页 > 数据库 > Oracle > CentOS5.6中装好Oracle11g之后,启动sqlplus报错

CentOS5.6中装好Oracle11g之后,启动sqlplus报错

原创 Oracle 作者:ora_erin 时间:2013-11-27 09:54:31 0 删除 编辑

--整理以前的学习笔记

CentOS5.6中装好Oracle11g之后,启动sqlplus报错

sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

网上查资料需要禁用selinux
root用户登录
使用cd命令切换当前目录到 /etc/selinux
使用vim打开config文件
找到里面的SELINUX条目,设置成disabled
重启系统


/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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

但是我禁用的时候设置错了,本来应该要把SELINUX=enforcing改为disabled,但是我却把SELINUXTYPE=targeted改成了disabled

导致重启之后报错unable to load selinux policy. kernel panic-not syncing: attempated to kill init!系统进不去


解决方法:
通过编辑Grub启动项解决。
在Grub启动菜单上按e进入编辑模式,在启动项最后面加上 enforcing=0 ,回车,然后按b启动即可
kernel /vmlinuz-2.6.19-prep ro root=LABEL=/ rhgb quiet 后面加上一个 enforcing=0,然后启动即可
启动后再把/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 - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted


参考资料:
http://www.crypt.gen.nz/selinux/disable_selinux.html
http://minyupeng.blog.163.com/blog/static/221544992011462156662/

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26524307/viewspace-1061198/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-04-16

  • 博文量
    37
  • 访问量
    655203