huixinbuding 2014-03-19
JAVA_HOME=/opt/jdk1.7.0 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME export PATH export CLASSPATH保存退出。
Error: failed /usr/admin/software/jdk1.7.0/jre/lib/i386/client/libjvm.so, because /usr/admin/software/jdk1.7.0/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: Permission denied网上搜后得知 原因是SELINUX被开启了
SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux® 上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件。
解决办法:vi /etc/sysconfig/selinux
# 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 - SELinux is fully disabled. SELINUX=enforcing # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted
将SELINUX=enforcing注释掉即可 。重新登陆虚拟机,就可成功执行 java命令。哦也!