title: How to set solr/home in linux OS?
body: <p>I know how to configure <code>solr.home</code> by using Tomcat 6, but I don't know how to set <code>solr.home</code> by using Glassfish(V2.1). I have tried to set the <code>solr.home</code> in <code>.profile</code> as fellows:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>and they all not work. The error is:</p>
  
  <blockquote>
    <p>HTTP Status 500 - Severe errors in solr configuration. Check your log
    files for more detailed information on what may be wrong. If you want
    solr to continue after configuration errors, change:
    false in null
    ------------------------------------------------------------- java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in
    classpath or 'solr/conf/',
    cwd=/home/huenzhao/search/glassfish/domains/domain1/config at
    org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:194)
    at
    org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.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)
    at
    org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
    at
    org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:273)
    at
    org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:385)
    at
    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)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:353) at
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
    at
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
    at
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
    at
    com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
    at
    com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1232)
    at
    com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
    at
    com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
    at
    com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
    at</p>
  </blockquote>
  
  <p>……</p>
  
  <p>Anybody knows? </p>