It looks like you export JAVA_OPTS in your .profile, but I bet Tomcat also sets and thus overrides this same JAVA_OPTS it its own start up script. So that is what you should edit and modify. I'm a Jetty user, so I don't have a Tomcat startup script to check for you.
Otis -- Sematext is hiring -- http://sematext.com/about/jobs.html?mls Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR ----- Original Message ---- > From: huenzhao <huenz...@126.com> > To: solr-user@lucene.apache.org > Sent: Thursday, August 6, 2009 9:53:26 PM > Subject: Re: How to set solr/home in linux OS? > > > I have tried, but it was also not work! > > The goal to set solr.home in tomcat6 is to start solr when the tomcat6 is > starting. > > So I think the problem is that the solr can not start by set the solr.home > when glassfish is starting. > > > > > Chantal Ackermann wrote: > > > > > > You have to quote values that include whitespace: > > > > export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/huenzhao/search/solr" > > > > or to make it accessible for other paths as well: > > export SOLR_HOME=/home/huenzhao/search/solr > > export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=$SOLR_HOME" > > > > > > > > Cheers, > > Chantal > > > > huenzhao schrieb: > >> Hi all, > >> > >> I know how to configure solr.home by using tomcat6, but I don't know how > >> to > >> set solr.home by using Glassfish(V2.1). I have tried to set the solr.home > >> in > >> .profile as 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 not work. The error is: > >> > >> 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 > >> > >> …… > >> > >> Anybody knows? > >> > >> Thanks! > >> > >> enzhao...@gmail.com > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/How-to-set-solr-home-in-linux-OS--tp24840832p24840832.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > -- > View this message in context: > http://www.nabble.com/How-to-set-solr-home-in-linux-OS--tp24840832p24857511.html > Sent from the Solr - User mailing list archive at Nabble.com.