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/12/19 17:18] demiankatzadministration:starting_and_stopping_solr [2023/03/08 18:45] demiankatz
Line 50: Line 50:
  
 <code> <code>
 +[Unit]
 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 167: Line 168:
 :!: If you need to run VuFind with non-default settings, you may wish to add some lines to export environment variables in this script, or else source a script containing all of your environment settings prior to running "solr.sh". In many newer installations of VuFind, such a script is already set up as /etc/profile.d/vufind.sh. :!: If you need to run VuFind with non-default settings, you may wish to add some lines to export environment variables in this script, or else source a script containing all of your environment settings prior to running "solr.sh". In many newer installations of VuFind, such a script is already set up as /etc/profile.d/vufind.sh.
  
-:!: Newer versions of Solr do not like to be run by the root user; you may need to either add "export SOLR_ADDITIONAL_START_OPTIONS=-force" to your script to force root permissions, or (preferably) set up your script to run Solr as a dedicated user (which can be done by wrapping the solr.sh command with "/bin/su - username -c ..."). +:!: Newer versions of Solr do not like to be run by the root user; you may need to either add "export SOLR_ADDITIONAL_START_OPTIONS=-force" to your script to force root permissions, or (preferably) set up your script to run Solr as a [[administration:security#creating_a_dedicated_solr_user|dedicated user]] (which can be done by wrapping the solr.sh command with "/bin/su - username -c ..."). 
  
 <code> <code>
Line 222: Line 223:
  
 To automate Solr with systemd: To automate Solr with systemd:
-  * create the user "solr", because Solr should not be run under root user.+  * [[administration:security#creating_a_dedicated_solr_user|create the user "solr"]], because Solr should not be run under root user.
   * add permission for the solr directory to this user:    * add permission for the solr directory to this user: 
  
Line 232: Line 233:
  
 <code> <code>
 +[Unit]
 Description=VuFind Starter Description=VuFind Starter
-After=network.target httpd.service mariadb.service+After=network.target
  
 [Service] [Service]
Line 249: Line 251:
 </code> </code>
  
-In VuFind 3.0 and later, the contents of the file should be as follows. It will work with the official VuFind 3 deb package (tested on Ubuntu 16.04).+In VuFind 7.0 and later, the contents of the file should be as follows. It will work with the official VuFind 3 deb package (tested on Ubuntu 16.04). For compatibility with VuFind 3.0 through 6.0, simply change "solr-8983.pid" to "solr-8080.pid" to reflect a different default port number.
  
 <code> <code>
-After=network.target httpd.service mariadb.service+[Unit] 
 +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=solr User=solr
 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 294: Line 297:
 If you simply stop the Solr server, users attempting to access your VuFind site will encounter error messages.  If you are planning an outage, you can take the site more gracefully offline by adjusting the "available" setting in the "[System]" section of your [[configuration:files:config.ini]] file. If you simply stop the Solr server, users attempting to access your VuFind site will encounter error messages.  If you are planning an outage, you can take the site more gracefully offline by adjusting the "available" setting in the "[System]" section of your [[configuration:files:config.ini]] file.
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
administration/starting_and_stopping_solr.txt · Last modified: 2023/10/24 13:47 by demiankatz