💾 Archived View for chirale.org › 2015-09-23_1296.gmi captured on 2024-08-18 at 17:36:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-12)
-=-=-=-=-=-=-
Here the instructions for a CentOS 6 with an already-installed Java 7 for Solr 5 without Tomcat.
cd yum install lsof unzip wget http://www.eu.apache.org/dist/lucene/solr/0/solr-tgz tar zxvf solr-tgz cd solr-0/bin
Now run the install_solr_service script as documented on official documentation:
documented on official documentation
mkdir /usr/local/etc/apache-solr-5 ./install_solr_service.sh ../../solr-tgz -i /usr/local/etc/apache-solr-5 -d /var/mysolr5 -u mysolr5 -s mysolr5 -p 5448
To get the current status:
service mysolr5 status
The service is already set to autostart:
chkconfig --list | grep solr mysolr5 0:off 1:off 2:on 3:on 4:on 5:on 6:off
If you want to secure the Solr instance running it only on localhost, you can add a custom SOLR_OPTS:
nano /var/mysolr5/solr.in.sh # Anything you add to the SOLR_OPTS variable will be included in the java # start command line as-is, in ADDITION to other options. If you specify the # -a option on start script, those options will be appended as well. Examples: # ... # run only on localhost SOLR_OPTS="$SOLR_OPTS -Djetty.host=1"
Apply the changes and then check where the service is running:
service mysolr5 restart netstat -tulpn | grep java tcp 0 0 ::ffff:1:4448 :::* LISTEN 11273/java tcp 0 0 ::ffff:1:5448 :::* LISTEN 11273/java
Before was available to all clients:
tcp 0 0 :::5448 :::* LISTEN 24541/java
Using supervisord
As alternative of the standard service you can use a nice tool like supervisor using the -f option to execute the command from there: I try before without the argument and supervisord will start the service on the client but it will not stop. Not good. The -f (foreground) option can solve this issue but I haven’t tested yet.
Using Tomcat
Tomcat is another way to run solr. I’ve used it in the past for multicore solr, but I will not use it anymore because I prefer single core running on multiple instances on different port. With this approach you can have a solr x and x instances running on the same server, not exactly efficient for consumed resources but really really more easy to deploy and maintain than Tomcat / multicore. So I’m happy with the service right now.