Hard-pressed SOLR + Resin

Source: Internet
Author: User
Tags solr

Resin3.1.9 & solr1.4.1 can be downloaded from the official website.

Install resin:

tar xzvf resin-version.tar.gzcd resin-version ./configure --prefix=/opt/resin \--enable-lfs \--with-java-home=/path/to/your/jdkmake make install

Configure SOLR:

cp apache-solr-1.4.1/example/webapps/solr.war /data/www/cp -r apache-solr-1.4.1/example/solr/ /data/www/

Add the resin configuration file (the last 10 rows are probably changed. Read the document carefully for the specific meaning, which is too hard ):

<! -- Resin 3.1 configuration file. --> <resin xmlns = "http://caucho.com/ns/resin" xmlns: resin = "http://caucho.com/ns/resin/core"> <! -- Adds all. jar files under the resin/lib directory --> <class-loader> <tree-loader Path = "$ {resin. home}/EXT-lib "/> <tree-loader Path =" $ {resin. root}/EXT-lib "/> <tree-loader Path =" $ {resin. home}/lib "/> <tree-loader Path =" $ {resin. root}/lib "/> </class-loader> <! ---Management configuration--remote management requires at least one enabled admin user. --> <management Path = "$ {resin. root}/admin "> <user name =" admin "Password =" password "Disable =" true "/> </Management> <! -- Logging configuration for the JDK logging API. --> <log name = "" level = "info" Path = "stdout:" timestamp = "[% H: % m: % S. % s] {%{ thread }}"/> <! ---'Info' for production-'Fine 'or 'finer' for development and troubleshooting --> <logger name = "com. caucho "level =" info "/> <logger name =" com. caucho. java "level =" Config "/> <logger name =" com. caucho. loader "level =" Config "/> <! -- For production sites, change dependency-check-interval to something-like 600 s, so it only checks for updates every 10 minutes. --> <dependency-check-interval> 2 S </dependency-check-interval> <! -- Sets the default character encoding to UTF-8---> <character-encoding> UTF-8 </character-encoding> <! -- You can change the compiler to "javac", "Eclipse" or "internal". --> <javac compiler = "internal" ARGs = "-source 1.5"/> <! -- Security providers.-<security-provider>-com.sun.net. SSL. Internal. SSL. provider-</security-provider> --> <! -- Uncomment to use resin's XML implementations--<system-property javax. XML. parsers. documentbuilderfactory-= "com. caucho. XML. parsers. xmldocumentbuilderfactory "/>-<system-property javax. XML. parsers. saxparserfactory-= "com. caucho. XML. parsers. xmlsaxparserfactory "/> --> <cluster id =" app-tier "> <! -- Sets the content root for the cluster, relative to server. Root --> <root-directory>. </root-directory> <server-default> <! -- The http port --> 

The error message returned when resin cannot be started.

/opt/resin/bin/httpd.sh: line 40: exec: -j: invalid optionexec: usage: exec [-cl] [-a name] file [redirection ...]

Later I compared httpd. Sh with jxg, and found that it was slightly different (it seems that I still want to learn shell ):

Original version:

#! /bin/sh## See contrib/init.resin for /etc/rc.d/init.d startup script## resin.sh can be called like apachectl## resin.sh         -- execs resin in the foreground# resin.sh start   -- starts resin in the background# resin.sh stop    -- stops resin# resin.sh restart -- restarts resin## resin.sh will return a status code if the wrapper detects an error, but# some errors, like bind exceptions or Java errors, are not detected.## To install, you'll need to configure JAVA_HOME and RESIN_HOME and# copy contrib/init.resin to /etc/rc.d/init.d/resin.  Then# use "unix# /sbin/chkconfig resin on"if test -n "${JAVA_HOME}"; then  if test -z "${JAVA_EXE}"; then    JAVA_EXE=$JAVA_HOME/bin/java  fifi## trace script and simlinks to find the wrapper#if test -z "${RESIN_HOME}"; then  script=`/bin/ls -l $0 | awk '{ print $NF; }'`  while test -h "$script"  do    script=`/bin/ls -l $script | awk '{ print $NF; }'`  done  bin=`dirname $script`  RESIN_HOME="$bin/.."fiexec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar $*

Jxg must be:

#! /bin/sh## See contrib/init.resin for /etc/rc.d/init.d startup script## resin.sh can be called like apachectl## resin.sh         -- execs resin in the foreground# resin.sh start   -- starts resin in the background# resin.sh stop    -- stops resin# resin.sh restart -- restarts resin## resin.sh will return a status code if the wrapper detects an error, but# some errors, like bind exceptions or Java errors, are not detected.## To install, you'll need to configure JAVA_HOME and RESIN_HOME and# copy contrib/init.resin to /etc/rc.d/init.d/resin.  Then# use "unix# /sbin/chkconfig resin on"if test -n "${JAVA_HOME}"; then  if test -z "${JAVA_EXE}"; then    JAVA_EXE=$JAVA_HOME/bin/java  fifiif test -z "${JAVA_EXE}"; then  JAVA_EXE=javafi## trace script and simlinks to find the wrapper#if test -z "${RESIN_HOME}"; then  script=`/bin/ls -l $0 | awk '{ print $NF; }'`  while test -h "$script"  do    script=`/bin/ls -l $script | awk '{ print $NF; }'`  done  bin=`dirname $script`  RESIN_HOME="$bin/.."fiexec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar $*

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.