【Oracle】sqlplus 遇到共享庫許可權不足

楊奇龍發表於2012-05-10
安裝oracle 11gr2 的完成 執行sqlplus 遇到如下錯誤:
oracle@rac:/opt>sqlplus "/as sysdba"
sqlplus: error while loading shared libraries: /opt/app/oracle/11.2.0/product/db_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
1 檢查SELinux是否開啟
[root@localhost db_1]# vi /etc/sysconfig/selinux
SELINUX=disabled
SELINUXTYPE=targeted
~
若為true 在 設定為disable 
2. 使用命令chcon改變檔案或者目錄的SELinux屬性, 語法chcon -t texrel_shlib_t 庫名字
oracle@rac:/opt>chcon -t  textrel_shlib_t $ORACLE_HOME/lib/libclntsh.so.11.1
oracle@rac:/opt>
oracle@rac:/opt>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Thu May 10 11:23:12 2012
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 
SQL> 
SQL> 
SQL> 
SQL> 
SQL> exit
執行成功!
一般是 SELinux 安全設定 導致許可權方面的不足 ,修改相應的許可權問題就好;
chcon是修改security context(安全上下文)中type的。
相關資料:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-723214/,如需轉載,請註明出處,否則將追究法律責任。

相關文章