Building Apache Solr - linux-on-ibm-z/docs GitHub Wiki
Building Apache Solr
General Notes:
-
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.6.1) was verified at the time of creation of these instructions
Step 1: Install Dependencies
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.9, 8.10, 9.2, 9.3, 9.4)
sudo yum install -y git tar wget lsof
-
With OpenJDK 11
sudo yum install -y git java-11-openjdk
-
With OpenJDK 17 (Except RHEL 7.x)
sudo yum install -y git java-17-openjdk-devel
-
With OpenJDK 21 (Except RHEL 7.x)
sudo yum install -y git java-21-openjdk-devel
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, Java 17 or Java 21) from here .
-
-
SLES (12 SP5, 15 SP5)
sudo zypper install -y git tar wget gzip gawk lsof
-
With OpenJDK 11
sudo zypper install -y --auto-agree-with-licenses java-11-openjdk
-
With OpenJDK 17 (Except SLES 12 SP5)
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk-devel
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, Java 17 or Java 21) from here .
-
-
Ubuntu (20.04, 22.04, 23.10, 24.04)
sudo apt-get update sudo apt-get install -y ant git tar wget lsof
-
With OpenJDK 11
sudo apt-get install -y openjdk-11-jdk
-
With OpenJDK 17
sudo apt-get install -y openjdk-17-jdk
-
With OpenJDK 21
sudo apt-get install -y openjdk-21-jdk
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, Java 17 or Java 21) from here .
-
Note: At the time of creation of these build instructions, Apache Solr 9.6.1 was verified with Eclipse Adoptium Temurin Runtime version 11.0.22 (build 11.0.22+7), Eclipse Adoptium Temurin Runtime version 17.0.10 (build 17.0.10+7), Eclipse Adoptium Temurin Runtime version 21.0.2 (build 21.0.2+13).
Step 2 : Set Environment Variables
-
Set JAVA_HOME and PATH
export JAVA_HOME=<Path to Java> export PATH=$JAVA_HOME/bin:$PATH
Step 3: Verification
3.1) Start Solr and create a core
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
3.2) Expected Output
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/