About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:starting_and_stopping_solr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
administration:starting_and_stopping_solr [2018/08/01 20:12] – [Linux Method] demiankatzadministration:starting_and_stopping_solr [2020/06/04 17:36] – [Linux Method] demiankatz
Line 51: Line 51:
 <code> <code>
 Description=VuFind Starter Description=VuFind Starter
-After=network.target httpd.service+After=network.target
  
 [Service] [Service]
 Type=forking Type=forking
 ExecStart=/bin/sh -l -c '/usr/local/vufind/solr.sh start' -x ExecStart=/bin/sh -l -c '/usr/local/vufind/solr.sh start' -x
-PIDFile=/usr/local/vufind/solr/vendor/bin/solr-8080.pid+PIDFile=/usr/local/vufind/solr/vendor/bin/solr-8983.pid
 User=vufind-user User=vufind-user
 ExecStop=/bin/sh -l -c "/usr/local/vufind/solr.sh stop" -x ExecStop=/bin/sh -l -c "/usr/local/vufind/solr.sh stop" -x
Line 288: Line 288:
 ==== Windows Method ==== ==== Windows Method ====
  
-=== VuFind 1.x === +As of VuFind 3.0, Solr can be started as a background process from the command line, so it should be possible manage it from within Windows; however, detailed instructions and best practices have not been developed as of this writing. Please feel free to contribute your own recommendations!
- +
-Jetty (the wrapper that allows Solr to run) can be set up as a Windows service.  First we need to change a couple of config settings, one is required, the others will just help. Assuming an install location of c:\vufind, edit c:\vufind\solr\jetty\bin\jetty-service.conf. Find the lines +
- +
-    wrapper.java.additional.1=-Djetty.home=../ +
-    wrapper.java.additional.2=-Djetty.logs=../logs +
-    wrapper.java.initmemory=3 +
-    wrapper.java.maxmemory=64 +
- +
-And change them to: +
- +
-    wrapper.java.additional.1=-Djetty.home=../ +
-    wrapper.java.additional.2=-Djetty.logs=../logs +
-    wrapper.java.additional.3=-Dsolr.solr.home=c:\vufind\solr +
-    wrapper.java.initmemory=64 +
-    wrapper.java.maxmemory=256 +
- +
-You'll notice the first two lines haven't changed (they were just for reference)and the third line is passing Jetty Solr's home location. The last two lines control how much memory the JVM Jetty will be running inside of has access to. The default settings limit the JVM to 64mb, and we're going to need a lot more to comfortably run a Solr index. 256mb is still low for a server, but it's enough to play around on a laptop in comfort. +
- +
-Now it's time to install the service. Open a command window and run the following: +
- +
-    cd \vufind\solr\jetty\bin +
-    Jetty-Service.exe -i jetty-service.conf +
- +
-NOTE: If you are running Windows Vista the above will still fail with 'access denied' unless you open the command prompt with admin rights. START > Programs > Accessories. Right-click on 'Command Prompt' and choose 'Run as administrator'+
- +
-=== VuFind 2.x === +
- +
-The Jetty service found in VuFind 1.x is no longer compatible with the version of Jetty used in VuFind 2.x.  A best practice for running VuFind 2.x's Solr index as a Windows service has not yet been determined.  See the [[http://vufind.org/jira/browse/VUFIND-589|VUFIND-589]] ticket in JIRA for some helpful links and discussion, and feel free to make suggestions there (or revise this page) if you get things working. +
- +
-February 2015: Solr was successfully configured as a service on both a Windows 7 test box running under XAMPP and a production Windows 8 R2 server using the following: http://blog.outerthoughts.com/2013/07/setting-up-apache-solr-on-windows-as-a-service/ It is not necessary to reinstall solr; simply point it to your current solr configuration e.g., C:\vufind\solr\jetty. Then skip down to the point in the instructions titled: Service Setup for Availability. This was the successfully modified command, remember to edit the path(s) as necessary and as stated in the online instructions, the following should not have any line breaks, insert spaces instead:  +
- +
-<code> +
-SolrService.exe //IS//SolrService --DisplayName="Solr Service" +
---Install=C:\vufind\solr\jetty\SolrService.exe +
---LogPath=C:\vufind\solr\jetty\logs +
---LogLevel=Debug --StdOutput=auto --StdError=auto +
---StartMode=java --StopMode=java --Jvm=auto +
-++JvmOptions=-Djetty.home=C:\vufind\solr\jetty ++JvmOptions=-DSTOP.PORT=8087 +
-++JvmOptions=-DSTOP.KEY=stopsolr ++JvmOptions=-Djetty.logs=C:\vufind\solr\jetty\logs +
-++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true +
-++JvmOptions=-XX:MaxPermSize=128M --Classpath=C:\vufind\solr\jetty\start.jar +
---StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTION=ALL +
-++StartParams=C:\vufind\solr\jetty\etc\jetty.xml +
---StopClass=org.eclipse.jetty.start.Main +
-++StopParams=--stop ++JvmOptions=-Dsolr.solr.home=C:\vufind\solr +
---StartPath=C:\vufind\solr\jetty +
-</code> +
- +
-// Note: the above should be entered as a single command line; it has been broken up here for readability. // +
- +
-Important! If you are running 64bit you'll need to retrieve the prunsrv.exe from the amd64 folder. +
- +
-Judy Drescher, Molloy College +
- +
-=== VuFind 3.x === +
- +
-Now that Solr can be started as a background process from the command line, it should be easier to manage it from within Windows; however, detailed instructions have not been developed as of this writing. Please feel free to contribute your own recommendations!+
  
 ===== Taking the User Interface Offline ===== ===== Taking the User Interface Offline =====
administration/starting_and_stopping_solr.txt · Last modified: 2023/10/24 13:47 by demiankatz