How to set solr/home in linux OS?

前端 未结 3 506
死守一世寂寞
死守一世寂寞 2021-01-21 04:23

I know how to configure solr.home by using Tomcat 6, but I don\'t know how to set solr.home by using Glassfish(V2.1). I have tried to set the sol

相关标签:
3条回答
  • 2021-01-21 04:40

    Try to set the following:

    export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/huenzhao/search/solr/" 
    
    0 讨论(0)
  • 2021-01-21 04:48

    Try setting a Java environment parameter from Java or edit your VM configuration:

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

    In my case I simply copied the 'solr' folder to glassfish/domains/domain1/config and it worked.

    0 讨论(0)
  • 2021-01-21 04:58

    if you are running solr inside tomcat as a container you can specify the solr home inside the XML descriptor for this webapp. (my terminology for this is probably a little off).

    I've got xml fragments for each solr instance I want to run and they specify their own local solr home directory inside the xml fragment. The fragments live at /conf/Catalina/localhost and each one manages a solr instance. This way I can have multiple solr instances on the same machine each with their own solr home variable.

    The info is here: http://wiki.apache.org/solr/SolrTomcat

    In paticular

    Create a Tomcat Context fragment to point docBase to the $SOLR_HOME/apache-solr-1.3.0.war file and solr/home to $SOLR_HOME:


    Symlink or place the file in $CATALINA_HOME/conf/Catalina/localhost/solr-example.xml, where Tomcat will automatically pick it up. Tomcat deletes the file on undeploy (which happens automatically if the configuration is invalid).

    0 讨论(0)
提交回复
热议问题