问题:
[root@Kernelry ~]# su - oracle
[oracle@Kernelry ~]$ sqlplus sys/oralinux as sysdba
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
原因:
查看 /var/log/messages 日志文件看到这么一条信息
Sep 10 03:19:27 Kernelry setroubleshoot:SELinux is preventing sqlplus from loading /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l bd06f0a6-a7fa-4045-8e70-27acdc122b4f
原来是SELinux机制阻止了sqlplus的加载。
解决方法:
1、临时设置: root用户执行 setenforce 1 ——更改SELinux为permissive状态
2、永久设置:编辑/etc/selinux/config ,修改SELINUX=permissive
为CentOS下的Oracle安装翅膀(sqlplus中方向键可用):http://www.linuxdiyf.com/linux/7896.html
CentOS 5下SQLPlus方向键无法使用:http://www.linuxdiyf.com/linux/5000.html
crontab定时sqlplus出错:http://www.linuxdiyf.com/linux/1967.html