Commit e28d9361fb3c1de6008f81e43fe93c68d3106098
1 parent
a564ec1e5b
Exists in
master
update SOLR info
Showing 1 changed file with 1 additions and 0 deletions Inline Diff
SOLR.INSTALL
1 | ################ | 1 | ################ |
2 | # SOLR INSTALL # | 2 | # SOLR INSTALL # |
3 | ################ | 3 | ################ |
4 | # | 4 | # |
5 | # Author Jean-François Rey | 5 | # Author Jean-François Rey |
6 | # Version : 1.0 | 6 | # Version : 1.0 |
7 | # Date : 18/07/2013 | 7 | # Date : 18/07/2013 |
8 | # | 8 | # |
9 | 9 | ||
10 | 1/ Edit install.sh and put CONFPASS=1 | 10 | 1/ Edit install.sh and put CONFPASS=1 |
11 | 11 | ||
12 | 2/ Run install.sh, this will check tomcat is installed, download and untar otmedia SOLR DB and ask for solr service info. | 12 | 2/ Run install.sh, this will check tomcat is installed, download and untar otmedia SOLR DB and ask for solr service info. |
13 | 13 | ||
14 | 3/ Configure Tomcat and SOLR | 14 | 3/ Configure Tomcat and SOLR |
15 | 15 | ||
16 | otmedia-2013-04 SOLR DB is untar in : | 16 | otmedia-2013-04 SOLR DB is untar in : |
17 | SOLR_OTMEDIA_PATH=OTMEDIA_HOME/tools/SOLR/otemdia-2013-04 | 17 | SOLR_OTMEDIA_PATH=OTMEDIA_HOME/tools/SOLR/otemdia-2013-04 |
18 | 18 | ||
19 | 3.1/ Set context file | 19 | 3.1/ Set context file |
20 | ---------------- | 20 | ---------------- |
21 | 21 | ||
22 | - in SOLR_OTMEDIA_PATH/solr/otmedia-document/solr-tomcat-deploy/solr-otmedia-document.xml | 22 | - in SOLR_OTMEDIA_PATH/solr/otmedia-document/solr-tomcat-deploy/solr-otmedia-document.xml |
23 | change DocBase to DocBase="SOLR_OTMEDIA_PATH/solr/otmedia-document/apache-solr-3.5.0.war" | 23 | change DocBase to DocBase="SOLR_OTMEDIA_PATH/solr/otmedia-document/apache-solr-3.5.0.war" |
24 | and value to value="SOLR_OTMEDIA_PATH/solr/otmedia-document/" | 24 | and value to value="SOLR_OTMEDIA_PATH/solr/otmedia-document/" |
25 | 25 | ||
26 | - in SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/solr-tomcat-deploy/solr-otmedia-multimedia.xml | 26 | - in SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/solr-tomcat-deploy/solr-otmedia-multimedia.xml |
27 | change DocBase to DocBase="SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/apache-solr-3.5.0.war" | 27 | change DocBase to DocBase="SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/apache-solr-3.5.0.war" |
28 | and value to value="SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/" | 28 | and value to value="SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/" |
29 | 29 | ||
30 | 3.2/ SOLR data configuration | 30 | 3.2/ SOLR data configuration |
31 | ----------------------- | 31 | ----------------------- |
32 | 32 | ||
33 | - in SOLR_OTMEDIA_PATH/solr/otmedia-document/conf/solrconfig.xml | 33 | - in SOLR_OTMEDIA_PATH/solr/otmedia-document/conf/solrconfig.xml |
34 | change dataDir (solr.data.dir) to SOLR_OTMEDIA_PATH/index/otmedia-document/ | 34 | change dataDir (solr.data.dir) to SOLR_OTMEDIA_PATH/index/otmedia-document/ |
35 | 35 | ||
36 | - in SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/conf/solrconfig.xml | 36 | - in SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/conf/solrconfig.xml |
37 | change dataDir (solr.data.dir) to SOLR_OTMEDIA_PATH/index/otmedia-multimedia/ | 37 | change dataDir (solr.data.dir) to SOLR_OTMEDIA_PATH/index/otmedia-multimedia/ |
38 | 38 | ||
39 | 3.3/ Add SOLR DB to Tomcat | 39 | 3.3/ Add SOLR DB to Tomcat |
40 | --------------------- | 40 | --------------------- |
41 | 41 | ||
42 | - in tomcat/Catalina/localhost/ (mainly in /etc/tomcat/Catalina/localhost or /var/lib/tomcat/conf/Catalina/localhost) | 42 | - in tomcat/Catalina/localhost/ (mainly in /etc/tomcat/Catalina/localhost or /var/lib/tomcat/conf/Catalina/localhost) |
43 | run : $> ln -s SOLR_OTMEDIA_PATH/solr/otmedia-document/solr-tomcat-deploy/solr-otmedia-document.xml solr-otmedia-document.xml | 43 | run : $> ln -s SOLR_OTMEDIA_PATH/solr/otmedia-document/solr-tomcat-deploy/solr-otmedia-document.xml solr-otmedia-document.xml |
44 | run : $> ln -s SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/solr-tomcat-deploy/solr-otmedia-multimedia.xml solr-otmedia-document.xml | 44 | run : $> ln -s SOLR_OTMEDIA_PATH/solr/otmedia-multimedia/solr-tomcat-deploy/solr-otmedia-multimedia.xml solr-otmedia-document.xml |
45 | 45 | ||
46 | 4/ Tomcat trouble | 46 | 4/ Tomcat trouble |
47 | 47 | ||
48 | 4.1/ SOLR use a lot of memory, you need to increase java heap space ! | 48 | 4.1/ SOLR use a lot of memory, you need to increase java heap space ! |
49 | ------------------------- | 49 | ------------------------- |
50 | 50 | ||
51 | - in catalina.sh (/usr/share/tomcat/bin) | 51 | - in catalina.sh (/usr/share/tomcat/bin) |
52 | add CATALINA_OPTS="$CATALINA_OPTS -Xms256m -Xmx512m" | 52 | add CATALINA_OPTS="$CATALINA_OPTS -Xms256m -Xmx512m" |
53 | You can increase heap space according to your need ! | ||
53 | 54 | ||
54 | 4.2/ Directory permissions | 55 | 4.2/ Directory permissions |
55 | --------------------- | 56 | --------------------- |
56 | 57 | ||
57 | - SOLR_OTMEDIA_PATH and subdirectory (and files) need to belong to tomcat group (and tomcat user if the default user don't belong to tomcat group). | 58 | - SOLR_OTMEDIA_PATH and subdirectory (and files) need to belong to tomcat group (and tomcat user if the default user don't belong to tomcat group). |
58 | chgrp -r tomcat7 otmedia-2013-04 | 59 | chgrp -r tomcat7 otmedia-2013-04 |
59 | chmod g+rx otmedia-2013-04 | 60 | chmod g+rx otmedia-2013-04 |
60 | 61 | ||
61 | 5/ Test | 62 | 5/ Test |
62 | 63 | ||
63 | You can test those requests (change ip and port): | 64 | You can test those requests (change ip and port): |
64 | http://localhost:8080/solr-otmedia-multimedia/select?q=test+bonus+&fq=docDate:[2011-12-30T00\:00\:01Z+TO+2012-01-01T23\:59\:59Z] | 65 | http://localhost:8080/solr-otmedia-multimedia/select?q=test+bonus+&fq=docDate:[2011-12-30T00\:00\:01Z+TO+2012-01-01T23\:59\:59Z] |
65 | http://localhost:8080/solr-otmedia-document/select?q=test+bonus+&fq=docDate:[2011-12-30T00\:00\:01Z+TO+2012-01-01T23\:59\:59Z] | 66 | http://localhost:8080/solr-otmedia-document/select?q=test+bonus+&fq=docDate:[2011-12-30T00\:00\:01Z+TO+2012-01-01T23\:59\:59Z] |
66 | 67 | ||
67 | 68 |