Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > e450e7f3d6075c4a54de19e68d38177f > files > 221

groonga-doc-3.0.5-1.fc18.x86_64.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>2.8. Others &mdash; groonga v3.0.5 documentation</title>
    
    <link rel="stylesheet" href="../_static/groonga.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.0.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="groonga v3.0.5 documentation" href="../index.html" />
    <link rel="up" title="2. Install" href="../install.html" />
    <link rel="next" title="3. Community" href="../community.html" />
    <link rel="prev" title="2.7. Oracle Solaris" href="solaris.html" /> 
  </head>
  <body>
<div class="header">
  <h1 class="title">
    <a id="top-link" href="../index.html">
      <span class="project">groonga</span>
      <span class="separator">-</span>
      <span class="description">An open-source fulltext search engine and column store.</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../ja/html/install/others.html"><img src="../_static/jp.png" alt="日本語">日本語版はこちら</a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../community.html" title="3. Community"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="solaris.html" title="2.7. Oracle Solaris"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../install.html" accesskey="U">2. Install</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="others">
<h1>2.8. Others<a class="headerlink" href="#others" title="Permalink to this headline">¶</a></h1>
<p>This section describes how to install groonga from source on UNIX like
environment.</p>
<p>To get more detail about installing groonga from source on the
specific environment, find the document for the specific environment
from <a class="reference internal" href="../install.html"><em>Install</em></a>.</p>
<div class="section" id="dependencies">
<h2>2.8.1. Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
<p>Groonga doesn't require any special libraries but requires some tools
for build.</p>
<div class="section" id="tools">
<h3>2.8.1.1. Tools<a class="headerlink" href="#tools" title="Permalink to this headline">¶</a></h3>
<p>Here are required tools:</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">wget</span></tt>, <tt class="docutils literal"><span class="pre">curl</span></tt> or Web browser for downloading source archive</li>
<li><tt class="docutils literal"><span class="pre">tar</span></tt> and <tt class="docutils literal"><span class="pre">gzip</span></tt> for extracting source archive</li>
<li>shell
(many shells such as <tt class="docutils literal"><span class="pre">dash</span></tt>, <tt class="docutils literal"><span class="pre">bash</span></tt> and <tt class="docutils literal"><span class="pre">zsh</span></tt> will work)</li>
<li>C compiler and C++ compiler
(<tt class="docutils literal"><span class="pre">gcc</span></tt> and <tt class="docutils literal"><span class="pre">g++</span></tt> are supported but other compilers may work)</li>
<li><tt class="docutils literal"><span class="pre">make</span></tt> (GNU make is supported but other make like BSD make will work)</li>
</ul>
</div></blockquote>
<p>You must get them ready.</p>
<p>You can use <a class="reference external" href="http://www.cmake.org/">CMake</a> instead of shell but this
document doesn't describe about building with CMake.</p>
<p>Here are optional tools:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.freedesktop.org/wiki/Software/pkg-config">pkg-config</a> for
detecting libraries</li>
<li><a class="reference external" href="http://www.gratisoft.us/sudo/">sudo</a> for installing built
groonga</li>
</ul>
</div></blockquote>
<p>You must get them ready if you want to use optional libraries.</p>
</div>
<div class="section" id="libraries">
<h3>2.8.1.2. Libraries<a class="headerlink" href="#libraries" title="Permalink to this headline">¶</a></h3>
<p>All libraries are optional. Here are optional libraries:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://mecab.sourceforge.net/">MeCab</a> for tokenizing full-text
search target document by morphological analysis</li>
<li><a class="reference external" href="http://www.phontron.com/kytea/">KyTea</a> for tokenizing full-text
search target document by morphological analysis</li>
<li><a class="reference external" href="http://www.zeromq.org/">ZeroMQ</a> for <a class="reference internal" href="../suggest.html"><em>Suggest</em></a></li>
<li><a class="reference external" href="http://libevent.org/">libevent</a> for <a class="reference internal" href="../suggest.html"><em>Suggest</em></a></li>
<li><a class="reference external" href="http://msgpack.org/">MessagePack</a> for supporting MessagePack
output and <a class="reference internal" href="../suggest.html"><em>Suggest</em></a></li>
<li><a class="reference external" href="http://www.thrysoee.dk/editline/">libedit</a> for command line
editing in <a class="reference internal" href="../reference/executables/groonga.html"><em>groonga command</em></a></li>
<li><a class="reference external" href="http://zlib.net/">zlib</a> for compressing column value</li>
<li><a class="reference external" href="http://www.oberhumer.com/opensource/lzo/">LZO</a> for compressing
column value</li>
</ul>
</div></blockquote>
<p>If you want to use those all or some libraries, you need to install
them before installing groonga.</p>
</div>
</div>
<div class="section" id="build-from-source">
<h2>2.8.2. Build from source<a class="headerlink" href="#build-from-source" title="Permalink to this headline">¶</a></h2>
<p>Groonga uses GNU build system. So the following is the simplest build
steps:</p>
<div class="highlight-none"><div class="highlight"><pre>% wget http://packages.groonga.org/source/groonga/groonga-3.0.5.tar.gz
% tar xvzf groonga-3.0.5.tar.gz
% cd groonga-3.0.5
% ./configure
% make
% sudo make install
</pre></div>
</div>
<p>After the above steps, <a class="reference internal" href="../reference/executables/groonga.html"><em>groonga command</em></a> is found in
<tt class="docutils literal"><span class="pre">/usr/local/bin/groonga</span></tt>.</p>
<p>The default build will work well but you can customize groonga at
<tt class="docutils literal"><span class="pre">configure</span></tt> step.</p>
<p>The following describes details about each step.</p>
<div class="section" id="configure">
<span id="source-configure"></span><h3>2.8.2.1. <tt class="docutils literal"><span class="pre">configure</span></tt><a class="headerlink" href="#configure" title="Permalink to this headline">¶</a></h3>
<p>First, you need to run <tt class="docutils literal"><span class="pre">configure</span></tt>. Here are important <tt class="docutils literal"><span class="pre">configure</span></tt>
options:</p>
<div class="section" id="prefix-path">
<h4>2.8.2.1.1. <tt class="docutils literal"><span class="pre">--prefix=PATH</span></tt><a class="headerlink" href="#prefix-path" title="Permalink to this headline">¶</a></h4>
<p>Specifies the install base directory. Groonga related files are
installed under <tt class="docutils literal"><span class="pre">${PATH}/</span></tt> directory.</p>
<p>The default is <tt class="docutils literal"><span class="pre">/usr/local</span></tt>. In this case, <a class="reference internal" href="../reference/executables/groonga.html"><em>groonga command</em></a> is
installed into <tt class="docutils literal"><span class="pre">/usr/local/bin/groonga</span></tt>.</p>
<p>Here is an example that installs groonga into <tt class="docutils literal"><span class="pre">~/local</span></tt> for an user
use instead of system wide use:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --prefix=$HOME/local
</pre></div>
</div>
</div>
<div class="section" id="localstatedir-path">
<h4>2.8.2.1.2. <tt class="docutils literal"><span class="pre">--localstatedir=PATH</span></tt><a class="headerlink" href="#localstatedir-path" title="Permalink to this headline">¶</a></h4>
<p>Specifies the base directory to place modifiable file such as log
file, PID file and database files. For example, log file is placed at
<tt class="docutils literal"><span class="pre">${PATH}/log/groonga.log</span></tt>.</p>
<p>The default is <tt class="docutils literal"><span class="pre">/usr/local/var</span></tt>.</p>
<p>Here is an example that system wide <tt class="docutils literal"><span class="pre">/var</span></tt> is used for modifiable
files:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --localstatedir=/var
</pre></div>
</div>
</div>
<div class="section" id="with-log-path-path">
<h4>2.8.2.1.3. <tt class="docutils literal"><span class="pre">--with-log-path=PATH</span></tt><a class="headerlink" href="#with-log-path-path" title="Permalink to this headline">¶</a></h4>
<p>Specifies the default log file path. You can override the default log
path is <a class="reference internal" href="../reference/executables/groonga.html"><em>groonga command</em></a> command's <tt class="docutils literal"><span class="pre">--log-path</span></tt>
command line option. So this option is not critical build option. It's
just for convenient.</p>
<p>The default is <tt class="docutils literal"><span class="pre">/usr/local/var/log/groonga.log</span></tt>. The
<tt class="docutils literal"><span class="pre">/usr/local/var</span></tt> part is changed by <tt class="docutils literal"><span class="pre">--localestatedir</span></tt> option.</p>
<p>Here is an example that log file is placed into shared NFS directory
<tt class="docutils literal"><span class="pre">/nfs/log/groonga.log</span></tt>:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-log-path=/nfs/log/groonga.log
</pre></div>
</div>
</div>
<div class="section" id="with-default-encoding-encoding">
<h4>2.8.2.1.4. <tt class="docutils literal"><span class="pre">--with-default-encoding=ENCODING</span></tt><a class="headerlink" href="#with-default-encoding-encoding" title="Permalink to this headline">¶</a></h4>
<p>Specifies the default encoding. Available encodings are <tt class="docutils literal"><span class="pre">euc_jp</span></tt>,
<tt class="docutils literal"><span class="pre">sjis</span></tt>, <tt class="docutils literal"><span class="pre">utf8</span></tt>, <tt class="docutils literal"><span class="pre">latin1</span></tt>, <tt class="docutils literal"><span class="pre">koi8r</span></tt> and <tt class="docutils literal"><span class="pre">none</span></tt>.</p>
<p>The default is <tt class="docutils literal"><span class="pre">utf-8</span></tt>.</p>
<p>Here is an example that Shift_JIS is used as the default encoding:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-default-encoding=sjis
</pre></div>
</div>
</div>
<div class="section" id="with-match-escalation-threshold-number">
<h4>2.8.2.1.5. <tt class="docutils literal"><span class="pre">--with-match-escalation-threshold=NUMBER</span></tt><a class="headerlink" href="#with-match-escalation-threshold-number" title="Permalink to this headline">¶</a></h4>
<p>Specifies the default match escalation threshold. See
<a class="reference internal" href="../reference/commands/select.html#match-escalation-threshold"><em>match_escalation_threshold</em></a> about match
escalation threshold. -1 means that match operation never escalate.</p>
<p>The default is 0.</p>
<p>Here is an example that match escalation isn't used by default:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-match-escalation-threshold=-1
</pre></div>
</div>
</div>
<div class="section" id="with-zlib">
<h4>2.8.2.1.6. <tt class="docutils literal"><span class="pre">--with-zlib</span></tt><a class="headerlink" href="#with-zlib" title="Permalink to this headline">¶</a></h4>
<p>Enables column value compression by zlib.</p>
<p>The default is disabled.</p>
<p>Here is an example that enables column value compression by zlib:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-zlib
</pre></div>
</div>
</div>
<div class="section" id="with-lzo">
<h4>2.8.2.1.7. <tt class="docutils literal"><span class="pre">--with-lzo</span></tt><a class="headerlink" href="#with-lzo" title="Permalink to this headline">¶</a></h4>
<p>Enables column value compression by LZO.</p>
<p>The default is disabled.</p>
<p>Here is an example that enables column value compression by LZO:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-lzo
</pre></div>
</div>
</div>
<div class="section" id="with-message-pack-message-pack-install-prefix">
<h4>2.8.2.1.8. <tt class="docutils literal"><span class="pre">--with-message-pack=MESSAGE_PACK_INSTALL_PREFIX</span></tt><a class="headerlink" href="#with-message-pack-message-pack-install-prefix" title="Permalink to this headline">¶</a></h4>
<p>Specifies where MessagePack is installed. If MessagePack isn't
installed with <tt class="docutils literal"><span class="pre">--prefix=/usr</span></tt>, you need to specify this option with
path that you use for building MessagePack.</p>
<p>If you installed MessagePack with <tt class="docutils literal"><span class="pre">--prefix=$HOME/local</span></tt> option, you
sholud specify <tt class="docutils literal"><span class="pre">--with-message-pack=$HOME/local</span></tt> to groonga's
<tt class="docutils literal"><span class="pre">configure</span></tt>.</p>
<p>The default is <tt class="docutils literal"><span class="pre">/usr</span></tt>.</p>
<p>Here is an example that uses MessagePack built with
<tt class="docutils literal"><span class="pre">--prefix=$HOME/local</span></tt> option:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-message-pack=$HOME/local
</pre></div>
</div>
</div>
<div class="section" id="with-munin-plugins">
<h4>2.8.2.1.9. <tt class="docutils literal"><span class="pre">--with-munin-plugins</span></tt><a class="headerlink" href="#with-munin-plugins" title="Permalink to this headline">¶</a></h4>
<p>Installs Munin plugins for groonga. They are installed into
<tt class="docutils literal"><span class="pre">${PREFIX}/share/groonga/munin/plugins/</span></tt>.</p>
<p>Those plugins are not installed by default.</p>
<p>Here is an example that installs Munin plugins for groonga:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-munin-plugins
</pre></div>
</div>
</div>
<div class="section" id="with-package-platform-platform">
<h4>2.8.2.1.10. <tt class="docutils literal"><span class="pre">--with-package-platform=PLATFORM</span></tt><a class="headerlink" href="#with-package-platform-platform" title="Permalink to this headline">¶</a></h4>
<p>Installs platform specific system management files such as init
script. Available platforms are <tt class="docutils literal"><span class="pre">redhat</span></tt> and <tt class="docutils literal"><span class="pre">fedora</span></tt>. <tt class="docutils literal"><span class="pre">redhat</span></tt>
is for Red Hat and Red Hat clone distributions such as
CentOS. <tt class="docutils literal"><span class="pre">fedora</span></tt> is for Fedora.</p>
<p>Those system management files are not installed by default.</p>
<p>Here is an example that installs CentOS specific system management
files:</p>
<div class="highlight-none"><div class="highlight"><pre>% ./configure --with-package-platform=redhat
</pre></div>
</div>
</div>
<div class="section" id="help">
<h4>2.8.2.1.11. <tt class="docutils literal"><span class="pre">--help</span></tt><a class="headerlink" href="#help" title="Permalink to this headline">¶</a></h4>
<p>Shows all <tt class="docutils literal"><span class="pre">configure</span></tt> options.</p>
</div>
</div>
<div class="section" id="make">
<h3>2.8.2.2. <tt class="docutils literal"><span class="pre">make</span></tt><a class="headerlink" href="#make" title="Permalink to this headline">¶</a></h3>
<p><tt class="docutils literal"><span class="pre">configure</span></tt> is succeeded, you can build groonga by <tt class="docutils literal"><span class="pre">make</span></tt>:</p>
<div class="highlight-none"><div class="highlight"><pre>% make
</pre></div>
</div>
<p>If you have multi cores CPU, you can make faster by using <tt class="docutils literal"><span class="pre">-j</span></tt>
option. If you have 4 cores CPU, it's good for using <tt class="docutils literal"><span class="pre">-j4</span></tt> option:</p>
<div class="highlight-none"><div class="highlight"><pre>% make -j4
</pre></div>
</div>
<p>If you get some errors by <tt class="docutils literal"><span class="pre">make</span></tt>, please report them to us:
<a class="reference internal" href="../contribution/report.html"><em>How to report a bug</em></a></p>
</div>
<div class="section" id="make-install">
<h3>2.8.2.3. <tt class="docutils literal"><span class="pre">make</span> <span class="pre">install</span></tt><a class="headerlink" href="#make-install" title="Permalink to this headline">¶</a></h3>
<p>Now, you can install built groonga!:</p>
<div class="highlight-none"><div class="highlight"><pre>% sudo make install
</pre></div>
</div>
<p>If you have write permission for <tt class="docutils literal"><span class="pre">${PREFIX}</span></tt>, you don't need to use
<tt class="docutils literal"><span class="pre">sudo</span></tt>. e.g. <tt class="docutils literal"><span class="pre">--prefix=$HOME/local</span></tt> case. In this case, use <tt class="docutils literal"><span class="pre">make</span>
<span class="pre">install</span></tt>:</p>
<div class="highlight-none"><div class="highlight"><pre>% make install
</pre></div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">2.8. Others</a><ul>
<li><a class="reference internal" href="#dependencies">2.8.1. Dependencies</a><ul>
<li><a class="reference internal" href="#tools">2.8.1.1. Tools</a></li>
<li><a class="reference internal" href="#libraries">2.8.1.2. Libraries</a></li>
</ul>
</li>
<li><a class="reference internal" href="#build-from-source">2.8.2. Build from source</a><ul>
<li><a class="reference internal" href="#configure">2.8.2.1. <tt class="docutils literal"><span class="pre">configure</span></tt></a><ul>
<li><a class="reference internal" href="#prefix-path">2.8.2.1.1. <tt class="docutils literal"><span class="pre">--prefix=PATH</span></tt></a></li>
<li><a class="reference internal" href="#localstatedir-path">2.8.2.1.2. <tt class="docutils literal"><span class="pre">--localstatedir=PATH</span></tt></a></li>
<li><a class="reference internal" href="#with-log-path-path">2.8.2.1.3. <tt class="docutils literal"><span class="pre">--with-log-path=PATH</span></tt></a></li>
<li><a class="reference internal" href="#with-default-encoding-encoding">2.8.2.1.4. <tt class="docutils literal"><span class="pre">--with-default-encoding=ENCODING</span></tt></a></li>
<li><a class="reference internal" href="#with-match-escalation-threshold-number">2.8.2.1.5. <tt class="docutils literal"><span class="pre">--with-match-escalation-threshold=NUMBER</span></tt></a></li>
<li><a class="reference internal" href="#with-zlib">2.8.2.1.6. <tt class="docutils literal"><span class="pre">--with-zlib</span></tt></a></li>
<li><a class="reference internal" href="#with-lzo">2.8.2.1.7. <tt class="docutils literal"><span class="pre">--with-lzo</span></tt></a></li>
<li><a class="reference internal" href="#with-message-pack-message-pack-install-prefix">2.8.2.1.8. <tt class="docutils literal"><span class="pre">--with-message-pack=MESSAGE_PACK_INSTALL_PREFIX</span></tt></a></li>
<li><a class="reference internal" href="#with-munin-plugins">2.8.2.1.9. <tt class="docutils literal"><span class="pre">--with-munin-plugins</span></tt></a></li>
<li><a class="reference internal" href="#with-package-platform-platform">2.8.2.1.10. <tt class="docutils literal"><span class="pre">--with-package-platform=PLATFORM</span></tt></a></li>
<li><a class="reference internal" href="#help">2.8.2.1.11. <tt class="docutils literal"><span class="pre">--help</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#make">2.8.2.2. <tt class="docutils literal"><span class="pre">make</span></tt></a></li>
<li><a class="reference internal" href="#make-install">2.8.2.3. <tt class="docutils literal"><span class="pre">make</span> <span class="pre">install</span></tt></a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="solaris.html"
                        title="previous chapter">2.7. Oracle Solaris</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../community.html"
                        title="next chapter">3. Community</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/install/others.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../community.html" title="3. Community"
             >next</a> |</li>
        <li class="right" >
          <a href="solaris.html" title="2.7. Oracle Solaris"
             >previous</a> |</li>
        <li><a href="../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../install.html" >2. Install</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>