How to install solr / home on Linux?

I know how to configure solr.homeusing Tomcat 6, but I do not know how to install solr.homeusing Glassfish (V2.1). I tried to install solr.homein .profileas fellows:

export solr.home=/home/huenzhao/search/solr
export solr/home=/home/huenzhao/search/solr
export solr.solr.home=/home/huenzhao/search/solr
export JAVA_OPTS=$JAVA_OPTS -Dsolr.solr.home=/home/huenzhao/search/solr

and they all do not work. Mistake:

HTTP Status 500 - Severe SolR configuration errors. Check your log files for more details on what might be wrong. If you want solr to continue after configuration errors, change: false to null ----------------------------------- --------------- ----------- java.lang.RuntimeException: Cannot find the resource 'solrconfig.xml' in the classpath or 'solr / conf /' , cwd = / home / huenzhao / search / glassfish / domains / domain1 / config at org.apache.solr.core.SolrResourceLoader.openResource (SolrResourceLoader.java:194) in org.apache.solr.core.SolrResourceLoader.openConfig (SolrResource .java: 162) at org.apache.solr.core.Config. (Config.java:100) at org.apache.solr.core.SolrConfig. (SolrConfig.java:113) at org.apache.solr.core.SolrConfig. (SolrConfig.java:70) at org.apache.solr.core.CoreContainer $ Initializer.initialize (CoreContainer.java:117) in org.apache.solr.servlet.SolrDispatchFilter.init (SolrDispatchFilter.java:69) in org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilter in org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java{85) in org.apache.catalina.core.ApplicationFilterConfig. (ApplicationFilterConfig.java:119) at org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:4498) at org.apache.catalina.core.StandardContext.start (StandardContext.java:5317) on com.sun. enterprise.web.WebModule.start (WebModule.javahaps53) in org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:989) in org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java: 973) at org.apache.catalina.core.StandardHost.addChild (StandardHost.java: 704) in com.sun.enterprise.web.WebContainer.loadWebModule (WebContainer.java:1627) in com.sun.enterprise.web.WebContainer.loadWebModule (WebContainer.java:1232) in com.sun.enterprise.server .WebModuleDeployEventListener.moduleDeployed (WebModuleDeployEventListener.java:182) in com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed (WebModuleDeployEventListener.java:278) in com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener (AdminEventMulticaster.java:1005 ) inmoduleDeployed (WebModuleDeployEventListener.java:278) in com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener (AdminEventMulticaster.java:1005) inmoduleDeployed (WebModuleDeployEventListener.java:278) in com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener (AdminEventMulticaster.java:1005) in

......

- ?

+3
3

solr tomcat , solr XML webapp. ( , , ).

xml solr, , solr xml-. /conf/Catalina/localhost, solr. , solr , solr home.

: http://wiki.apache.org/solr/SolrTomcat

paticular

Tomcat point docBase $SOLR_HOME/ apache-solr-1.3.0.war solr/home - $SOLR_HOME:


  Symlink $CATALINA_HOME////Solr-example.xml, Tomcat . Tomcat undeploy ( ).

+4

:

export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/huenzhao/search/solr/" 
+1

Try setting the Java environment parameter from Java or changing the virtual machine configuration:

System.setProperty("solr.solr.home", "/home/user/apache-solr-1.4/example/solr");

In my case, I just copied the "solr" folder to glassfish / domains / domain1 / config and it worked.

0
source

Source: https://habr.com/ru/post/1714478/


All Articles