For ubuntu 11.04 (used by quickstart) the alternative data directory needs needs to be set in solrconfig.xml to /var/lib/solr/data (like in its original solrconfig.xml). This should be mentioned in the README.txt.

In solrconfig.xml find:

  <!--
    <dataDir>${solr.data.dir:./solr/data}</dataDir>
  -->

and replace with:

  <dataDir>/var/lib/solr/data</dataDir>

Thanks to tyler_renelle for the Tututorial: Installing apachesolr.module on Ubuntu 10.04 which solved my config problem.

Comments

nick_vh’s picture

Are you suggesting that we should add this information to the solrconfig? I'm sure the drupal quickstart can make a script that modifies this variable?

osopolar’s picture

Maybe for others the solrconfig.xml works fine, but not for Ubuntu 11.4. I used the README.txt to apply the required configuration steps. To me the README.txt seems to be the best place to document this. Maybe in the section Troubleshooting or directly by the step where to copy solrconfig.xml. Otherwise maybe in the handbook at d.o.

nick_vh’s picture

Hmm, I don't think the problem is Ubuntu. I think the problem is the way you install Solr. Feel free to add this documentation to the handbook and fix this issue when you've done that. Thanks!

osopolar’s picture

The quickstart-install-script for solr just does this:

sudo apt-get -y install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
sudo apt-get -y install solr-common solr-tomcat

Therefore I guess it is valid at least for ubuntu users. So you do not like to add a hint to the README.txt? If not, I'll may add it somewhere to the handbook.

nick_vh’s picture

It was up until Ubuntu 11.04 never recommended to install Solr that way. (I still wouldn't do it)

Provide a patch and we'll consider adding it to solrconfig.xml. But only as an extra commented line.

osopolar’s picture

StatusFileSize
new1.14 KB

Wondering about the recommended way to install solr on ubuntu 11.04. The tutorials in the handbook (Solr Ubuntu Server 10.04) using also this way. But no I have read in the README: "The Debian/Ubuntu packages for Solr should NOT be used to install Solr.". Is this still valid for Ubuntu 11.04? If so the quickstart install script might be changed.

I added the patch for solrconfig.xml and README.txt.

pwolanin’s picture

Status: Active » Closed (works as designed)

no. Don't use the packages.

osopolar’s picture

Category: feature » support
Status: Closed (works as designed) » Active

May you point me why not using this packages? Thanks.

nick_vh’s picture

Status: Active » Closed (works as designed)

Since they have a bad reputation of breaking things. (at least everything before 11.04). Nothing prevents you from installing those. Until proven stable then we do not change the policy :-)

kenorb’s picture

At the time of writing, Ubuntu 12.04.1 LTS has already stable solr version: 1.4.1+dfsg1-2ubuntu2

But still this is true:
http://drupalcode.org/project/apachesolr.git/blame/refs/heads/7.x-1.x:/R...

The Debian/Ubuntu packages for Solr should NOT be used to install Solr. For example, do NOT install the solr or solr-jetty packages.

So

Solr 3.5.0 or later is strongly preferred.

I've tested 1.4.1, but I had some problems, so I had to install 3.6.2 manually.

Links:
Server: http://www.apache.org/dyn/closer.cgi/lucene/solr/3.6.2
Client: http://code.google.com/p/solr-php-client/downloads/list