Setup on *NIX systems¶
Please use this guide to install the required components for an Apache Solr Server. If you are already have an installed Apache Tomcat Server then look at this guide instead. LINK
Prerequisites¶
Install asumes that you have
- TYPO3 4.5 or higher
- Java 1.6 or higher
Obtaining the extension¶
You can install the extension in 3 different ways:
Directly from GIT¶
you can get the code directly by:
git clone git://git.typo3.org/TYPO3v4/Extensions/solr.git/ solr/
As a T3X Package¶
Weekly builds are available on sourceforge, updated every Sunday
From the TER (recomended way)¶
- Go to the Extension Manager and search for "solr".
- Install the Extension.
- It will require the additional extension pagebrowse for pagination of the search results and the "scheduler" system extension for running the indexing tasks
- We recommend installing devlog for easier error detection, too.
Installing Apache Tomcat and Apache Solr¶
Please make sure to use a current Java SDK. Many distributions offer Open JDK. We have made the experience that the Java JDK from Oracle is somehow better at the current state. Your mileage may vary.
We have included an install script to automatically set up Tomcat and Solr. You can find it in source:trunk/resources/shell/install-solr.sh. It was originally taken from the Apache Solr Wiki and has been modified quite a lot to suit the TYPO3 specific changes.
That shell script will do a full setup, download recent versions of Tomcat and Solr, install them into /opt/solr-tomcat, download configuration files and plugins from forge SVN, at the end it will start up Tomcat.
Manual Install without Script¶
TODO Please describe exaclty, which steps are necessary to manually setup a Solr installation for use with the Typo3 Solr Extension. This might be desirable in the following situations:- Extending an existing Solr installation with additional cores for use with Typo3
- Using common Solr cores for both Typo3 and 3rd-party applications with advanced configuration requirements
- Verifying checksums or signatures for all downloaded components (the above install script does not do that)
- Installing on a node that does not have internet access
The following Steps are necessary:
- Download the Java Library solr-typo3-plugin-1.2.0.jar
TODO Which version to use? Are there checksums? Where is the source code? How to build it? - Make sure this library and the following ones from the Apache Solr distribution are available in your Solr installation:
- apache-solr-analysis-extras-*.jar
- apache-solr-cell-*.jar
- apache-solr-clustering-*.jar
- apache-solr-dataimporthandler-*.jar
- apache-solr-dataimporthandler-extras-*.jar
- apache-solr-uima-*.jar
XXX These are the libs copied over by the install script. Are they really necessary?
Note: To make these libraries available, use one of the numerous extension mechanisms of Tomcat (or your servlet container) or of Solr itself
- Make sure all components required by the Typo3 Solr Extension are setup properly in your respective solrconfig.xml (can be done per Solr core)
In particular, setup the custom query parser for the Typo3 Solr Extension:
<queryParser name="typo3access" class="org.typo3.solr.search.AccessFilterQParserPlugin"/>
For an example see source:trunk/resources/solr/typo3cores/conf/solrconfig.xml - In your Solr Schema, setup all
typesandfieldsrequired for use with the Typo3 Solr Extension
For examples, see the files source:trunk/resources/solr/typo3cores/conf/general_schema_types.xml and source:trunk/resources/solr/typo3cores/conf/general_schema_fields.xml
You can also download these files and link them into your schema like so:
<xi:include href="path/to/general_schema_types.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <xi:include href="path/to/general_schema_fields.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
Managing Tomcat¶
- To manually start and stop tomcat, make sure to go to /opt/solr-tomcat as a base directory, so that solr finds its home directory correctly.
- To start, call
tomcat/bin/startup.sh - To stop, call
tomcat/bin/shutdown.sh
Autostart Tomcat with Debian¶
- Copy ../solr/resources/tomcat/tomcat6 to
/etc/init.d/tomcat6and callupdate-rc.d tomcat6 defaults