Java deployment for Solr
Download Java
Download Java, for example for OpenJDK from open-source package repositories, or from other commercial distributors. Make sure that the Java version is supported by both, ImageMaster and Solr according to:
-
the compatibility guide for ImageMaster [T Compatibility Guide]
-
the Java requirements for Solr [Solr Requirements]
Note that, as part of the ImageMaster release 9.14.1, all related modules included in the release must be executed using Java 17. However, artifacts deployed on the Solr 8 server will continue to be built using Java 11. This ensures compatibility with Solr 8 without requiring an upgrade to Java 17.
Set Java home
Add the JAVA_HOME variable to the server environment variables, e.g. by adding the following two lines to the file “/etc/profile”, where you specify the path where you installed java:
export JAVA_HOME=path where you installed java
export PATH=$JAVA_HOME/bin:$PATH
If you do not have access to “/etc/profile”, create the file “profile” (with the above export commands) inside your installation folder. The following example assumes that you have extracted Solr into the subfolder “installations/solr/” as your desired Solr installation directory. The folder “solr” and the file “profile” must be located in the same folder:
In any case, after creating or adjusting the file “profile”, in the command line go to the folder where you have the “profile” file and execute the following command:
source profile
Verify that used Java version is supported
Execute the following command:
java -version
Make sure that the output of this command shows the supported version of Java that you intend to use, for example:
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Zulu 8.56.0.21-CA-linux64) (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Zulu 8.56.0.21-CA-linux64) (build 25.302-b08, mixed mode)