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.
playground:playground

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
Last revisionBoth sides next revision
playground:playground [2014/01/21 18:30] – [Decide on what kind of multi instance you want] chriskeeneplayground:playground [2014/01/21 19:29] – [4 Set up a new Solr Core - if required] chriskeene
Line 87: Line 87:
 ===== 3 Setting up the New Instance ===== ===== 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, then go to the install script for your new instance in a web browser using a URL similar to <nowiki>http://my-vufind-server/my-instance-dir/Install/Home</nowiki> +The following steps should work for most setups but you may need to follow the steps that you did on initial [[installation notes|installation]]
  
   - Restart Apache for the new config to take effect.   - Restart Apache for the new config to take effect.
Line 96: Line 96:
  
 ===== 4 Set up a new Solr Core - if required ===== ===== 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. +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 on the same system, 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)   * Shutdown vufind ($VUFIND_HOME/vufind.sh stop)
Line 105: Line 105:
 cp -pr biblio springfield cp -pr biblio springfield
 </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 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>   * Edit solr/solr.xml to make the new core active. <code><core name="springfield" instanceDir="springfield"/></code>
   * 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 are about two).
Line 138: Line 138:
  
 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 [[..:installing_multiple_instances|VuFind 1.x multiple instances documentation]] for some tips; steps 4 and 6 there are still relevant. 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 [[..: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 =====
 +The following example creates a new instance called springfield, with a new Solr core, on server vufindserver as user libadmin.
 +<code>
 +libadmin@vufindserver:/etc$ cd $VUFIND_HOME
 +libadmin@vufindserver:/usr/local/vufind$ php install.php --multisite
 +VuFind has been found in /usr/local/vufind.
 +
 +Where would you like to store your local settings? [/usr/local/vufind/local] springfield
 +
 +VuFind supports use of a custom module for storing local code changes.
 +If you do not plan to customize the code, you can skip this step.
 +If you decide to use a custom module, the name you choose will be used for
 +the module's directory name and its PHP namespace.
 +
 +What module name would you like to use? [blank for none]
 +
 +What base path should be used in VuFind's URL? [/vufind] /springfield
 +
 +When running multiple VuFind sites against a single installation, youneed
 +to decide how to distinguish between instances.  Choose an option:
 +
 +1.) Directory-based (i.e. http://server/vufind1 vs. http://server/vufind2)
 +2.) Host-based (i.e. http://vufind1.server vs. http://vufind2.server)
 +
 +or enter 0 to disable multisite mode.
 +
 +Which option do you want? 1
 +Apache configuration written to /usr/local/vufind/springfield/httpd-vufind.conf.
 +
 +You now need to load this configuration into Apache.
 +You can do it in either of two ways:
 +
 +    a) Add this line to your /etc/apache2/httpd.conf file:
 +       Include /usr/local/vufind/springfield/httpd-vufind.conf
 +
 +    b) Link the configuration to Apache's conf.d directory like this:
 +       ln -s /usr/local/vufind/springfield/httpd-vufind.conf /etc/apache2/conf.d/vufind
 +
 +Option b is preferable if your platform supports it,
 +but option a is more certain to be supported.
 +
 +Once the configuration is linked, restart Apache.  You should now be able
 +to access VuFind at http://localhost/springfield
 +
 +For proper use of command line tools, you should also ensure that your
 +VUFIND_HOME and VUFIND_LOCAL_DIR environment variables are set to
 +/usr/local/vufind and /usr/local/vufind/springfield respectively.
 +
 +
 +libadmin@vufindserver:/usr/local/vufind$ sudo ln -s /usr/local/vufind/springfield/httpd-vufind.conf /etc/apache2/conf.d/vufind-springfield
 +[sudo] password for libadmin:
 +libadmin@vufindserver:/usr/local/vufind$ ln -s $VUFIND_HOME/public $VUFIND_HOME/public-springfield
 +libadmin@vufindserver:/usr/local/vufind$ vi springfield/httpd-vufind.conf
 +# edited lines: Alias /springfield /usr/local/vufind/publicspringfield 
 +# And: Alias /springfield /usr/local/vufind/publicspringfield
 +libadmin@vufindserver:/usr/local/vufind$ sudo /etc/init.d/apache2 restart
 + * Restarting web server apache2                       [ OK ]
 +libadmin@vufindserver:/usr/local/vufind$ cd springfield/config/
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ mkdir vufind
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ sudo chown www-data:www-data /usr/local/vufind/springfield/config/vufind
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ sudo chown www-data:www-data /usr/local/vufind/springfield/cache/
 +
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ # go to http://vufindserver.example.com/springfield/Install/Home
 +
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ $VUFIND_HOME/vufind.sh stop
 +Shutting down VuFind ...
 +STOPPED Tue Jan 21 18:45:55 GMT 2014
 +libadmin@vufindserver:/usr/local/vufind/springfield/config$ cd $VUFIND_HOME/solr
 +libadmin@vufindserver:/usr/local/vufind/solr$ cp -pr biblio springfield
 +libadmin@vufindserver:/usr/local/vufind/solr$ cd springfield/
 +libadmin@vufindserver:/usr/local/vufind/solr/springfield$ rm -r index
 +libadmin@vufindserver:/usr/local/vufind/solr/springfield$ cd ..
 +libadmin@vufindserver:/usr/local/vufind/solr$ vi solr.xml
 +libadmin@vufindserver:/usr/local/vufind/solr$ # added <core name="springfield" instanceDir="springfield"/>
 +libadmin@vufindserver:/usr/local/vufind/solr$ vi springfield/conf/solrconfig.xml
 +libadmin@vufindserver:/usr/local/vufind/solr$ # replaced biblio with springfield twice
 +libadmin@vufindserver:/usr/local/vufind/solr$ vi $VUFIND_HOME/springfield/config/vufind/config.ini
 +libadmin@vufindserver:/usr/local/vufind/solr$ # replaced biblio with springfield
 +libadmin@vufindserver:/usr/local/vufind/solr$ vi $VUFIND_HOME/springfield/import/import.properties
 +libadmin@vufindserver:/usr/local/vufind/springfield/import$ # replaced biblio with springfield twice
 +libadmin@vufindserver:/usr/local/vufind/springfield/import$ $VUFIND_HOME/vufind.sh start
 +libadmin@vufindserver:/usr/local/vufind/springfield/import$ # and now to import records
 +libadmin@vufindserver:/usr/local/vufind/springfield/import$ export VUFIND_LOCAL_DIR=/usr/local/vufind/springfield
 +libadmin@vufindserver:/usr/local/vufind/springfield/import$ cd $VUFIND_HOME
 +libadmin@vufindserver:/usr/local/vufind$ ./import-marc.sh testfile.mrc
 +</code>
 ---- struct data ---- ---- struct data ----
 ---- ----