小编Waq*_*leh的帖子

如何在 CentOS 上正确设置 JAVA_HOME?

我正在尝试设置JAVA_HOME,以便我可以在本教程的帮助下安装 Apache Solr。我使用连接到我的服务器的SSHroot用户

要允许正在运行的 sh 脚本安装 Apache Solr:

mount | grep noexec
Run Code Online (Sandbox Code Playgroud)

使用 exec 选项重新挂载文件系统:

mount -o remount,exec /dev/md1
Run Code Online (Sandbox Code Playgroud)

然后每次我尝试使用以下命令安装它时

bin/install_solr_service.sh /tmp/solr-5.3.1.tgz
Run Code Online (Sandbox Code Playgroud)

我收到以下消息:

WARNING: /opt/solr-5.3.1 already exists! Skipping extract ...

Creating /etc/init.d/solr script ...
The currently defined JAVA_HOME (/usr/local/jdk) refers
to a location where Java could not be found.  Aborting.
Either fix the JAVA_HOME variable or remove it from the
environment so that the system PATH will be searched.
The currently …
Run Code Online (Sandbox Code Playgroud)

centos java jdk

10
推荐指数
2
解决办法
8万
查看次数

标签 统计

centos ×1

java ×1

jdk ×1