Warning: This page has not been updated in over over a year and may be outdated or deprecated.
playground:playground
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
playground:playground [2014/01/21 18:48] – [4 Set up a new Solr Core - if required] chriskeene | playground:playground [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PlayGround ====== | ||
- | |||
- | |||
- | |||
- | Start of possible revised multi instance page. | ||
- | |||
- | |||
- | ====== Installing Multiple Instances ====== | ||
- | |||
- | // This page refers to VuFind 2.x; for similar notes related to earlier versions, see [[..: | ||
- | |||
- | There are a few reasons you might want to have several instances of VuFind. | ||
- | |||
- | * You need to present the same index in slightly different ways at different URLs (i.e. filter differently or offer different themes for members of a consortium) | ||
- | * You use VuFind as the basis for several distinct, separate systems running on the same server (i.e. a bibliography project distinct from your library catalog) | ||
- | |||
- | Regardless of your use case, you probably do not need to actually install multiple copies of VuFind. | ||
- | |||
- | |||
- | ===== 0 Decide on what kind of multi instance you need ===== | ||
- | Vufind has been designed to allow much of the configuration (including theme choice) to be set per instance, while allowing those options unchanged to be inherited from the main configuration. There are a few things you will need to decide upfront when setting up a new instance: | ||
- | * Will the new instance use the same database as other instances, or have its own? The database stores users, favorites and tags, so the question really comes down to if you want the new instance to have the same users and tags as existing instances, or to have its own. See the bottom of the page for more information | ||
- | * Will the new instance have its own Solr Core? The Solr Core holds the searchable bibliographic records, if you want the new instance to search a separate set of records then it will need its own Solr core. See the bottom of the page for other options. | ||
- | * Will your system use directories or hostnames to differentiate different sites? | ||
- | |||
- | |||
- | ===== 1 Creating a New instance and local configuration directory ===== | ||
- | |||
- | It is suggested (but not required) that you create a unique string for each multisite, you can use for: the directory/ | ||
- | |||
- | Run the standard install script (used during the original installation) but with the --multisite switch. | ||
- | |||
- | < | ||
- | cd $VUFIND_HOME | ||
- | php install.php --multisite | ||
- | </ | ||
- | |||
- | This will prompt for the name of a new [[local settings directory]] for your instance, (e.g. using the exmaple above, ' | ||
- | |||
- | 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.: | ||
- | < | ||
- | sudo ln -s / | ||
- | </ | ||
- | The location of the Apache config directory will vary on different systems. | ||
- | |||
- | Note: | ||
- | * If you have already installed a copy of VuFind in single site mode, you need to reconfigure it by re-running install.php with the --multisite switch in order to generate a multisite-capable Apache configuration. The " | ||
- | * Windows users should be aware that running install.php creates a new " | ||
- | |||
- | ===== 2 Configure Apache ===== | ||
- | ==== Apache Configuration for Directory-Based Multisite ==== | ||
- | |||
- | Due to the way VuFind' | ||
- | |||
- | - Create a symbolic link to the ' | ||
- | - Edit the httpd-vufind.conf for the new instance, and change the Alias and Directory lines to point to the symbolic link created specifically for that instance. e.g. < | ||
- | Alias / | ||
- | < | ||
- | </ | ||
- | |||
- | |||
- | |||
- | Note: This is not ideal -- there should be a way to make the configuration work without duplication of the public directory. | ||
- | |||
- | ==== Apache Configuration for Host-Based Multisite ==== | ||
- | |||
- | If you are pointing multiple hostnames at a single server and using these to distinguish between VuFind instances, you can't simply link up the httpd-vufind.conf configurations generated by install.php. | ||
- | |||
- | < | ||
- | < | ||
- | ServerName test1 | ||
- | </ | ||
- | |||
- | Include / | ||
- | |||
- | < | ||
- | ServerName test2 | ||
- | </ | ||
- | |||
- | Include / | ||
- | </ | ||
- | |||
- | Note that when you restart Apache after adding these settings (either by editing httpd.conf or by putting a new file in Apache' | ||
- | |||
- | // In some Linux distributions, | ||
- | |||
- | ===== 3 Setting up the New Instance ===== | ||
- | |||
- | After this, follow the same steps that you did on initial [[installation notes|installation]] -- link up your Apache configuration, | ||
- | |||
- | - Restart Apache for the new config to take effect. | ||
- | - Go to < | ||
- | - It may report that you need to run 'chown www-data: | ||
- | - The Web interface will not allow you to specify an existing database. If you wish to use the same database as other instances (i.e. one of the decisions listed above) you will need to specify these in the cfg file. If you wish to create a new database you can use either the web interface or the cfg file. | ||
- | - If you are not ready to configure the ILS Driver at this time (for live holdings availabiluty) select noILS. | ||
- | |||
- | ===== 4 Set up a new Solr Core - if required ===== | ||
- | Cores hold the searchable records within vufind. Follow these steps if this instance will 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 on the same system, though there are other options, see further down this page. | ||
- | |||
- | * Shutdown vufind ($VUFIND_HOME/ | ||
- | * Copy the existing core (usually biblio) under VuFind' | ||
- | cd $VUFIND_HOME/ | ||
- | cp -pr biblio springfield | ||
- | </ | ||
- | * 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 < | ||
- | * Edit solr/ | ||
- | * Edit conf/ | ||
- | * edit $VUFIND_HOME/< | ||
- | * If using SolrMarc (i.e. if you will be importing MARC records in to this instance), configure import/ | ||
- | |||
- | 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. | ||
- | |||
- | ===== 5 Configure your new instance ===== | ||
- | ==== Basic Configuration ==== | ||
- | |||
- | If your new instance is configured almost exactly like your previous instance but with a few minor modifications, | ||
- | |||
- | ==== Custom Code ==== | ||
- | |||
- | If you need to write code that is specific to a particular instance, or if you need to customize code in different ways for different instances, you just need to create a separate module for each instance. | ||
- | |||
- | ==== Custom Theme ==== | ||
- | |||
- | VuFind' | ||
- | |||
- | ===== Further information on MySQL Databases and Solr instances ===== | ||
- | ==== 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. | ||
- | |||
- | ==== Using Multiple Solr Instances : 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' | ||
- | |||
- | 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 [[..: | ||
- | ---- struct data ---- | ||
- | ---- | ||
playground/playground.1390330109.txt.gz · Last modified: 2014/06/13 13:13 (external edit)