Setup on *NIX » History » Version 14
Please Note: This Version requires TYPO3 Version 4.3!¶
Directly from SVN¶
you can get the code directly by:
svn export https://svn.typo3.org/TYPO3v4/Extensions/solr/trunk solr/
As a T3X Package¶
From the TER (recomended way)¶
Go to the Extension Manager and search for "solr". Install the Extension. It will require the additional extension called "pagebrowse". we recommed to use the devlog Extension too.
Installing Tomcat and Solr¶
Please make sure to use a current Java SDK. Many distributions offer a JDK called Open JDK. We have made the experience that the Java JDK from Sun is some how better at the current state. Your mileage may vary.
Link to Installing Java goes here.
We have included an install script to get the components for you by commandline. You can find it in
resources/shell/install-solr.sh. It was taken from the Solr Wiki.
#!/bin/bash cd /opt mkdir solr-tomcat cd solr-tomcat/ TOMCAT_VER=6.0.20 wget http://mirrors.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-6/v$TOMCAT_VER/bin/apache-tomcat-$TOMCAT_VER.zip #find the latest nightly solr build NIGHTLY=`wget -O - http://people.apache.org/builds/lucene/solr/nightly/ | grep '.zip' | sed 's/.*\(solr-20..-..-..\.zip\).*/\1/' | tail -1` wget http://people.apache.org/builds/lucene/solr/nightly/$NIGHTLY unzip apache-tomcat-$TOMCAT_VER.zip unzip $NIGHTLY cp apache-solr-nightly/dist/apache-solr-nightly.war apache-tomcat-$TOMCAT_VER/webapps/solr.war cp -r apache-solr-nightly/example/solr . chmod a+x apache-tomcat-$TOMCAT_VER/bin/* ./apache-tomcat-$TOMCAT_VER/bin/startup.sh echo "Now browse to http://localhost:8080/solr/admin/"
Note: Instead of "wget" you can use "curl -L -O"
- To 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
- To stop, call
- After running the basic solr installation script, your solr instance will be at /opt/solr-tomcat/.
- The default home directory will be /opt/solr-tomcat/solr, and we'll need to put into some configuration files from the solr extension.
/opt/solr-tomcat/solr/conf, overriding the defaults.
- If needed, comment out the
Configuring the Solr extension¶
- Install it
- Set config.index_enable = 1 inside your TS template
- Include the static TypoScript from the solr extension.
- Check that the constants @plugin.tx_solr.solr.* are set correctly. In my case I had to adjust the port from 8983 to 8080, depending on your servlet container.
- On the root page, check the flag "is_siteroot" (Is root of website)
- Make sure to wrap content to be indexed with <!-- TYPO3SEARCH_begin --> and <!-- TYPO3SEARCH_end -->
- If you have done all of the above, you should see inside the DevLog that pages get added to the index. However, if you search after it, you probably won't find anything just now, because the data is not yet committed.
- How to commit
- Either set
solrconfig.xml), to commit after each submitted document. However, this is really slow. Remove this before going live
- Or (preferred), use the following CURL command:
curl http://localhost:PORT/PATH-TO-SOLR/update -H "Content-Type: text/xml" --data-binary '<commit />'
- Either set
Before going production¶
- Did you disable error logging in TypoScript?
- set up some automatic crawling configuration? TODO
- Did you tune the
solrconfig.xmlfor live needs?
Problems with german umlauts
Note to allow search with umlauts tomcat needs to be configured to use UTF-8 encoded urls¶
Got to apache-tomcat/conf/server.xml and change the URI encoding:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />