Sign up ×  Short version: What is the most secure way to allow
Java 7 to run on (with?) SELinux?  Long version:  Sorry in
advance if I use incorrect terminology. I'm really just a Java
developer with a meager smattering of Linux skills.  I just
installed Java 7 on CentOS release 5.3 (Final) that is
apparently has Security Enhanced Linux. After the install was
complete (which I "installed" by unzipping the tar.gz file from
Oracle in /usr/java/jdk/jdk1.7.0_25), I ran java -version and
got this error:  Error: dl failure on line 864 Error: failed
/usr/java/jdk1.7.0_25/jre/lib/i386/server/,       because
/usr/java/jdk1.7.0_25/jre/lib/i386/server/       cannot restore
segment prot after reloc: Permission denied`  I found a few
articles stating this can be due to SELinux and to try
setenforce 0 and see if the problem goes away. I ran that
command and Java worked. But these same articles say that
leaving setenforce 0 on an Internet connected host is dangerous,
and my host is connected to the Internet.  There are othe