Posts Tagged ‘Disable SELinux’

SELinux and Oracle – How to disable SELinux and make Oracle work

If you encounter this error on Oracle it is a good possibility that you have SELinux enabled on your Linux box:

$> sqlplus / 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
The quick way to get Oracle working is to use setenforce:

$> setenforce 0
$> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 13 15:31:35 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.

However, this solution will only work until you reboot the server.
To permanently fix this issue you need to modify the SELinux configuration file:

$> vi /etc/selinux/config
Change:
SELINUX=enforcing
To:
SELINUX=disabled
You should also be able to use permissive mode on single instances, if you change to this mode BEFORE you install Oracle:
SELINUX=permissive
CRS will not like permissive mode, so this does not apply for RAC installations.
Now SQL*Plus works:

$> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 13 15:31:35 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.

Posted by pparkko on March 8th, 2010 No Comments