Apache Solr is an open source search platform written on Java. Solr provides full-text search, spell suggestions, custom document ordering and ranking, Snippet generation and highlighting. This tutorial will help you to install Apache Solr 7.5 on Fedora 28/27/26/25, CentOS/RHEL 7/6 systems.
Step 1 – Prerequsities
Apache Solr 7 required Java 8 or greater to run. Make sure your system fulfill Java requirements of Apache Solr. If you don’t have java installed on your system, use our tutorials to install Java 8.
java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b11, mixed mode)
Step 2 – Install Apache Solr on CentOS
Now download the required Solr version from its official site or mirrors. You may also use the below command to download Apache Solr 7.5.0 from its official website. After that extract the installer script.
wget http://www-eu.apache.org/dist/lucene/solr/7.5.0/solr-7.5.0.tgz tar xzf solr-7.5.0.tgz solr-7.5.0/bin/install_solr_service.sh --strip-components=2
Then execute the installer script with bash shell followed with downloaded Archive file. The command will be like below:
sudo bash ./install_solr_service.sh solr-7.3.0.tgz
This will create an account named solr on your system and finish the installation process. After that start the service default Solr port 8983.
Step 3 – Manage Solr Service
Use the following commands to Start, Stop and check the status of Solr service.
For SysVinit Users –
sudo service solr stop sudo service solr start sudo service solr status
For Systemd Users –
sudo systemctl stop solr sudo systemctl start solr sudo systemctl status solr
Step 4 – Create Your First Solr Collection
After successful installation of Apache Solr service on your system. Create your first collection using the following command. You may change the mycol1 with your collection name.
sudo su - solr -c "/usr/local/solr/bin/solr create -c mycol1-n data_driven_schema_configs"
Created new core 'mycol1'
Step 5 – Access Solr Web Admin Panel
Default Solr runs on port 8983. You can access Solr port in your web browser and you will get Solr dashboard.
Here you can view statics of created collection in previous steps named “mycol1”. Click on “Core Selector” on the left sidebar and select created collection.