Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:solr

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
freebsd:solr [2012/09/24 17:06]
Idefix
freebsd:solr [2013/12/16 12:29] (aktuell)
idefix freebsd-solr umbenannt in freebsd:solr
Zeile 1: Zeile 1:
 +Installation of Solr on FreeBSD in combination with jetty. I you have tomcat running I suggest you move to jetty.
 +I assume you have already a running java environment (openjdk) running.
 +
 +Install jetty:
 +<​code>​
 +cd /​usr/​ports/​www/​jetty/​
 +make install
 +make clean
 +echo jetty_enable="​YES"​ >> /​etc/​rc.conf
 +cp /​usr/​local/​jetty/​etc/​jetty.xml /​usr/​local/​etc/​jetty.xml
 +echo "# Do not truncate command line arguments in ps(1) listing"​ >> /​etc/​sysctl.conf
 +echo kern.ps_arg_cache_limit=10000 >> /​etc/​sysctl.conf
 +/​etc/​rc.d/​sysctl restart
 +</​code>​
 +
 +and solr with:
 +<​code>​
 +cd /​usr/​ports/​textproc/​apache-solr
 +make install
 +make clean
 +</​code>​
 +
 +Configure solr, I use only one database, but you can use as many as you want.
 +<​code>​
 +mkdir /​usr/​local/​solr
 +cd !$
 +cp /​usr/​local/​share/​examples/​apache-solr/​solr/​solr.xml .
 +chmod 664 solr.xml
 +chown -R www:www .
 +</​code>​
 +Edit solr.xml to have the following content:
 +<​code>​
 +<?xml version="​1.0"​ encoding="​UTF-8"​ ?>
 +<!--
 +<​code>​
 + ​Licensed to the Apache Software Foundation (ASF) under one or more
 + ​contributor license agreements. ​ See the NOTICE file distributed with
 + this work for additional information regarding copyright ownership.
 + The ASF licenses this file to You under the Apache License, Version 2.0
 + (the "​License"​);​ you may not use this file except in compliance with
 + the License. ​ You may obtain a copy of the License at
 +     ​http://​www.apache.org/​licenses/​LICENSE-2.0
 + ​Unless required by applicable law or agreed to in writing, software
 + ​distributed under the License is distributed on an "AS IS" BASIS,
 + ​WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + See the License for the specific language governing permissions and
 + ​limitations under the License.</​code>​
 +-->
 +
 +<!--
 +<​code>​
 +   This is an example of a simple "​solr.xml"​ file for configuring one or
 +   more Solr Cores, as well as allowing Cores to be added, removed, and
 +   ​reloaded via HTTP requests.
 +   More information about options available in this configuration file,
 +   and Solr Core administration can be found online:
 +   ​http://​wiki.apache.org/​solr/​CoreAdmin</​code>​
 +-->
 +
 +<!--
 +<​code>​
 + All (relative) paths are relative to the installation path
 +  persistent: Save changes made via the API to this file
 +  sharedLib: path to a lib directory that will be shared across all cores</​code>​
 +-->
 +<solr persistent="​false">​
 +
 +<​code>​
 +  <!--
 +  adminPath: RequestHandler path to manage cores.
 +    If '​null'​ (or absent), cores will not be manageable via request handler
 +  -->
 +  <cores adminPath="/​admin/​cores"​ sharedLib="​lib">​
 +    <core name="​drupal"​ instanceDir="​drupal"​ />
 +  </​cores></​code>​
 +</​solr>​
 +</​code>​
 +
 +Next step is to create the folders and copy config files for all cores you have added:
 +<​code>​
 +mkdir -p drupal/conf
 +cd !$
 +cp -r /​usr/​local/​share/​examples/​apache-solr/​solr/​conf/​* ./
 +cd -
 +chown -R www:www *
 +</​code>​
 +
 +Now we configure jetty to use Solr:
 +<​code>​
 +cd /​usr/​local/​jetty/​webapps/​
 +ln -s /​usr/​local/​share/​java/​classes/​apache-solr-3.6.0.war solr.war
 +cd /​usr/​local/​jetty
 +ln -s /​usr/​local/​solr
 +service jetty restart
 +</​code>​
 +
 +You should now get a Solr page by going to http:<​nowiki>//</​nowiki>​localhost:​8080/​solr/​drupal/​admin/​.
  
freebsd/solr.txt · Zuletzt geändert: 2013/12/16 12:29 von idefix