In this tutorial, we'll show you how to install Apache Solr on Arch Linux. Solr is an open-source search platform that allows you to add search capabilities to your applications.
Before installing Solr, make sure you have the following prerequisites installed on your system:
First, you need to download the latest version of Apache Solr from the official website https://lucene.apache.org/solr/.
$ wget https://archive.apache.org/dist/lucene/solr/8.8.2/solr-8.8.2.tgz
Next, extract the downloaded archive using tar command. We’ll extract the archive in /opt
directory:
$ sudo tar -xvf solr-8.8.2.tgz -C /opt/
It is recommended to run Solr using a dedicated user account. Let's create a new system user and assign ownership of the Solr directory:
$ sudo useradd --no-create-home --shell /bin/false solr
$ sudo chown -R solr:solr /opt/solr-8.8.2
Now, switch to the solr user and start Solr using the following command:
$ sudo -u solr /opt/solr-8.8.2/bin/solr start
This will start Solr on port 8983. You can check the status of Solr by accessing http://localhost:8983 in your web browser.
To create a Solr core, we’ll use the solr create
command:
$ sudo -u solr /opt/solr-8.8.2/bin/solr create -c my_core
Finally, verify the creation of the Solr core by accessing http://localhost:8983/solr/#/my_core/ in your web browser.
Congratulations! You have successfully installed Apache Solr on Arch Linux. You can now use Solr to add search capabilities to your applications.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!