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.
installation:installing_multiple_instances

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
installation:installing_multiple_instances [2015/12/11 20:26] – [Custom Theme] demiankatzinstallation:installing_multiple_instances [2020/08/07 17:47] demiankatz
Line 1: Line 1:
 ====== Installing Multiple Instances ====== ====== Installing Multiple Instances ======
- 
-// This page refers to VuFind 2.x; for similar notes related to earlier versions, see [[legacy:installation:installing_multiple_instances|this page]]. // 
  
 There are a few reasons you might want to have several instances of VuFind.  Two real-life examples: There are a few reasons you might want to have several instances of VuFind.  Two real-life examples:
Line 29: Line 27:
 </code> </code>
  
-This will prompt for the name of a new [[vufind2:local_settings_directory]] for your instance, (e.g. using the exmaple above, 'springfield').  You will also need to specify a different base path and/or [[development:architecture:customizing_vufind#Modules|custom code module]] name when prompted.+This will prompt for the name of a new [[configuration:local_settings_directory|local settings directory]] for your instance, (e.g. using the exmaple above, 'springfield').  You will also need to specify a different base path and/or [[development:architecture:customizing_vufind#Modules|custom code module]] name when prompted.
  
 At the end it will prompt you to create a symbolic link for your new sites httpd-vufind.conf config file in the Apache directory. E.g.: At the end it will prompt you to create a symbolic link for your new sites httpd-vufind.conf config file in the Apache directory. E.g.:
Line 86: Line 84:
  
 ===== 4 Set up a new Solr Core - if required ===== ===== 4 Set up a new Solr Core - if required =====
-Solr Cores hold the searchable records within vufind. Follow these steps if you want this instance to search different records to other instances of vufind on your system. +Solr Cores hold the searchable records within VuFind. Follow these steps if you want this instance to search different records to other instances of vufind on your system. 
  
 The most common setup, outlined here is an additional core on the existing Solr instance, though there are other options, see further down this page. The most common setup, outlined here is an additional core on the existing Solr instance, though there are other options, see further down this page.
  
-  * Shutdown vufind ($VUFIND_HOME/vufind.sh stop)+  * Shut down Solr (see [[administration:starting_and_stopping_solr#stopping_solr_manually|stopping Solr manually]])
   * Copy the existing core (usually biblio) under VuFind's solr directory to a new directory of your choice. e.g. <code>   * Copy the existing core (usually biblio) under VuFind's solr directory to a new directory of your choice. e.g. <code>
 cd $VUFIND_HOME/solr cd $VUFIND_HOME/solr
Line 96: Line 94:
 </code> </code>
   * If you don't want your new core to contain the records of the core you just copied from (e.g. biblio), go in to the new directory and delete (or move if you are cautious) the index folder <code>cd springfield; rm -r index</code>   * If you don't want your new core to contain the records of the core you just copied from (e.g. biblio), go in to the new directory and delete (or move if you are cautious) the index folder <code>cd springfield; rm -r index</code>
-  * Edit solr/solr.xml to make the new core active<code><core name="springfield" instanceDir="springfield"/></code+  * If you are using an old version of VuFind (pre-3.0) you may have to edit solr/solr.xml to make the new core active (<nowiki><core name="springfield" instanceDir="springfield"/></nowiki>); newer versions will load the core automatically.  
-  * Edit conf/solrconfig.xml (in the new core directory) to adjust incorrect paths. If you have copied the biblo folder, use your text editor to search for 'biblio' and replace all occurrences (there are about two).+  * Edit conf/solrconfig.xml (in the new core directory) to adjust incorrect paths. If you have copied the biblo folder, use your text editor to search for 'biblio' and replace all occurrences (there should be one or two).
   * edit $VUFIND_HOME/<instance_name>/config/vufind/config.ini, change the default_core setting under [index] to use the new core. E.g.:   default_core    = springfield   * edit $VUFIND_HOME/<instance_name>/config/vufind/config.ini, change the default_core setting under [index] to use the new core. E.g.:   default_core    = springfield
-  * If using SolrMarc (i.e. if you will be importing MARC records in to this instance), configure import/import.properties in your [[vufind2:local_settings_directory]] to point to the new core.+  * If using SolrMarc (i.e. if you will be importing MARC records in to this instance), configure import/import.properties in your [[configuration:local_settings_directory|local settings directory]] to point to the new core.
    
 Important: When indexing, make sure that the VUFIND_LOCAL_DIR environment variable points to the correct configuration so that records are sent to the appropriate place. All cronjobs to import records in to different cores will need to set this variable. Important: When indexing, make sure that the VUFIND_LOCAL_DIR environment variable points to the correct configuration so that records are sent to the appropriate place. All cronjobs to import records in to different cores will need to set this variable.
Line 114: Line 112:
 ==== Custom Theme ==== ==== Custom Theme ====
  
-VuFind's theme is determined by [[..:config.ini]] settings.  Since each instance of VuFind has its own [[..:config.ini]] in its [[vufind2:local_settings_directory]], you can easily configure separate themes for separate instances.  Since themes can inherit from one another, it is possible to create a base theme for shared customizations and isolate minor, distinctive changes to very small, instance-specific themes.  See [[development:architecture:user_interface|Customizing the User Interface]] for more details.+VuFind's theme is determined by [[configuration:files:config.ini]] settings.  Since each instance of VuFind has its own [[configuration:files:config.ini]] in its [[configuration:local_settings_directory|local settings directory]], you can easily configure separate themes for separate instances.  Since themes can inherit from one another, it is possible to create a base theme for shared customizations and isolate minor, distinctive changes to very small, instance-specific themes.  See [[development:architecture:user_interface|Customizing the User Interface]] for more details.
  
 ===== Further information on MySQL Databases and Solr instances ===== ===== Further information on MySQL Databases and Solr instances =====
 ==== Sharing (or not sharing) a MySQL Database ==== ==== Sharing (or not sharing) a MySQL Database ====
  
-If you simply create a new instance with install.php and the web-based install script, VuFind will attempt to create a separate MySQL database for each instance.  This may be desirable if each instance has its own distinct user base and tags/favorites should not flow between instances.  However, it is more common that you will want to share a database.  In this situation, just manually copy the database settings from your original instance's [[..:config.ini]] file into the new instance instead of using the "fix" link in the automatic installer.  If you use a shared base configuration as suggested [[#Basic Configuration|above]], you can even avoid duplicating credentials in multiple places.+If you simply create a new instance with install.php and the web-based install script, VuFind will attempt to create a separate MySQL database for each instance.  This may be desirable if each instance has its own distinct user base and tags/favorites should not flow between instances.  However, it is more common that you will want to share a database.  In this situation, just manually copy the database settings from your original instance's [[configuration:files:config.ini]] file into the new instance instead of using the "fix" link in the automatic installer.  If you use a shared base configuration as suggested [[#Basic Configuration|above]], you can even avoid duplicating credentials in multiple places.
  
 ==== Using Multiple Solr Instances : Create a New Solr Instance ==== ==== Using Multiple Solr Instances : Create a New Solr Instance ====
Line 125: Line 123:
 The steps above setup a new Solr core in an existing Solr instance, which will probably be suitable for most systems. However another option is to create a New Solr Instance: The steps above setup a new Solr core in an existing Solr instance, which will probably be suitable for most systems. However another option is to create a New Solr Instance:
  
-Creating a new core usually makes more sense than creating a copy of Solr, but if your index is too large to fit on a single server, you could also copy VuFind's Solr index and startup script to another server, and reconfigure your instance to point there (using the url setting in the [Index] section of [[..:config.ini]] and, if necessary, the solr.path = REMOTE and solr.hosturl settings of SolrMarc's import.properties file). +Creating a new core usually makes more sense than creating a copy of Solr, but if your index is too large to fit on a single server, you could also copy VuFind's Solr index and startup script to another server, and reconfigure your instance to point there (using the url setting in the [Index] section of [[configuration:files:config.ini]] and, if necessary, the solr.path = REMOTE and solr.hosturl settings of SolrMarc's import.properties file).
- +
-It probably does not make sense to try to run two separate instances of Solr on a single server, but if you have a good reason to do this, refer to the old [[legacy:installation:installing_multiple_instances|VuFind 1.x multiple instances documentation]] for some tips; steps 4 and 6 there are still relevant. +
 ===== Example shell transcript of setting up a new instance ===== ===== Example shell transcript of setting up a new instance =====
 The following example creates a new instance called springfield, with a new Solr core, on server vufindserver as user libadmin. The following example creates a new instance called springfield, with a new Solr core, on server vufindserver as user libadmin.
Line 215: Line 210:
 libadmin@vufindserver:/usr/local/vufind$ ./import-marc.sh testfile.mrc libadmin@vufindserver:/usr/local/vufind$ ./import-marc.sh testfile.mrc
 </code> </code>
 +
 +===== Additional Resources =====
 +
 +  * [[installation:installing_multiple_instances:automation_example|Multiple Instances Automation Example]]
 ---- struct data ---- ---- struct data ----
 ---- ----
  
installation/installing_multiple_instances.txt · Last modified: 2023/11/28 20:25 by demiankatz