-
Notifications
You must be signed in to change notification settings - Fork 56
Building Apache Solr
-
When following the steps below, please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
Apache Solr binaries are available and can be downloaded from here. To use these binaries, different Java flavors can be installed on mentioned distributions.
Note: Apache Solr (v9.8.0) was verified at the time of creation of these instructions
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y git tar wget lsof procps-ng
-
SLES 15 SP6
sudo zypper install -y git tar wget gzip gawk lsof
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get update sudo apt-get install -y git tar wget lsof
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9).
- Download and install IBM Semeru Runtime (Java 11, Java 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, Java 17 or 21) from here.
-
With OpenJDK 11
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-11-openjdk
- SLES 15 SP6
sudo zypper install -y --auto-agree-with-licenses java-11-openjdk
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-11-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 17
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-17-openjdk-devel
- SLES 15 SP6
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-17-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 21
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-21-openjdk-devel
- SLES 15 SP6
sudo zypper install -y --auto-agree-with-licenses java-21-openjdk java-21-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-21-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
Note: At the time of creation of these build instructions, Apache Solr 9.8.0 was verified with Eclipse Adoptium Temurin Runtime version 11.0.24 (build 11.0.24+8), Eclipse Adoptium Temurin Runtime version 17.0.12 (build 17.0.12+7), Eclipse Adoptium Temurin Runtime version 21.0.4 (build 21.0.4+7), IBM Semeru Runtime version 11.0.24 (build 11.0.24+8), IBM Semeru Runtime version 17.0.9 (build 17.0.9+9) and IBM Semeru Runtime version 21.0.4 (build 21.0.4+7).
-
Set JAVA_HOME and PATH
export JAVA_HOME=<Path to Java> export PATH=$JAVA_HOME/bin:$PATH
Extract Apache Solr binary tar to $SOURCE_ROOT
and follow steps given below.
cd $SOURCE_ROOT/<Apache_Solr_binary_folder>/bin
sudo chmod a+x solr
./solr start
./solr create -c sample
The./solr start
command will start the Solr server on port 8983. The ./solr create -c sample
command should create a core and output:
Created new core 'sample'
Access the Solr Admin Console at: http://HOST_IP:8983/solr/
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.