Commit d93dab09a0b95d54fa03aed8a2b5c5de69c13c7e

Authored by Jean-François Rey
1 parent b50ebdf386
Exists in master

update

Showing 3 changed files with 21 additions and 12 deletions Side-by-side Diff

... ... @@ -5,7 +5,7 @@
5 5 /local_disk/zeus2/OTMEDIA/INA-TV2
6 6  
7 7 Il y a des trucs de partout...
8   -mais le plus interressent est dans hermes2, zeus2, et gaia
  8 +mais le plus intéressant est dans hermes2, zeus2, et gaia
9 9  
10 10  
11 11 NYX ================================================================
... ... @@ -9,7 +9,7 @@
9 9  
10 10 1/ Edit install.sh and put CONFPASS=1
11 11  
12   -2/ Run install.sh, this will check tomcat is installed, 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 14 3/ Configure Tomcat and SOLR
15 15  
... ... @@ -139,9 +139,11 @@
139 139  
140 140  
141 141 ### Speeral Configuration ###
  142 +
  143 +echo -e "\t${txtblu}Speeral configuration${txtrst}\n"
142 144 echo -e "Download Speeral bin and data :"
143 145 scp -r rey@nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/
144   -echo -e "\t${txtblu}Generating Speeral configuration files :${txtrst}\n"
  146 +echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n"
145 147 cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \
146 148 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \
147 149 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \
148 150  
... ... @@ -190,10 +192,10 @@
190 192 echo -e "${txtpur}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n"
191 193 exit 1;
192 194 fi
193   - echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}"
  195 + echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n"
194 196 # SOLR secondly
195 197 echo -e "\t${txtblu}Install SOLR DB${txtrst}"
196   - read -p "You will need 300 Go of free space to install SOLR DB\nContinue ? (y/n) " solr
  198 + read -e -p "You will need 300 Go of free space to install SOLR DB\nContinue ? (y/n) " solr
197 199 if [ "$solr" == "y" ]
198 200 then
199 201  
200 202  
201 203  
202 204  
203 205  
204 206  
... ... @@ -201,20 +203,27 @@
201 203 mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null
202 204 scp -r rey@nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR
203 205 echo -e "Unzip SOLR DB\r"
  206 + res=0
204 207 #res = $(tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" "$OTMEDIA_HOME/tools/SOLR/")
205 208 if [ $res -eq 2 ]; then echo " ${txtpur}NOT OK${txtrst}";
206 209 else echo " ${txtgrn}OK${txtrst}"; fi
  210 + else
  211 + echo "Skipping SOLR install"
  212 + fi
  213 + read -e -p "Configure SOLR DB server ? (y/n) " solr
  214 + if [ "$solr" == "y" ]
207 215 read -p "Enter SOLR server IP :" ip
208   - if [ $ip == "" ];then ip="127.0.0.1";fi
209   - echo 'machine = "194.57.216.43"' > $OTMEDIA_HOME/tools/scripts/solrinfo.py
  216 + if [ "${ip}" == "" ];then ip="127.0.0.1";fi
  217 + echo 'machine = "${ip}"' > $OTMEDIA_HOME/tools/scripts/solrinfo.py
210 218 read -p "Enter SOLR server port :" port
211   - if [ $port == "" ]; then port="8080";fi
212   - echo "\n\tSOLR server IP $ip"
213   - echo "\tSOLR server port $port"
214   - echo 'port = "8080"' >> $OTMEDIA_HOME/tools/scripts/solrinfo.py
  219 + if [ "${port}" == "" ]; then port="8080";fi
  220 + echo -e "\n\tSOLR server IP ${ip}"
  221 + echo -e "\tSOLR server port ${port}"
  222 + echo 'port = "${port}"' >> $OTMEDIA_HOME/tools/scripts/solrinfo.py
215 223 else
216   - echo "Skipping SOLR install"
  224 + echo "Skipping SOLR DB Configuration"
217 225 fi
  226 + echo -e "See SOLR.INSTALL file for more information\n"
218 227 fi
219 228  
220 229 ### Set Variables in bashrc ###