1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
<!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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiredTiger: Building and installing WiredTiger on POSIX</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="wiredtiger.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="LogoFinal-header.png" alt="WiredTiger" /></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
 <span id="projectnumber">Version 3.2.1</span>
</div>
<div id="projectbrief"><!-- 3.2.1 --></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="banner">
<a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
<a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('build-posix.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">Building and installing WiredTiger on POSIX </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="posix_github"></a>
Building using Git and GitHub</h1>
<p>Skip this step if you are building from a WiredTiger release package, and proceed with <a class="el" href="build-posix.html#posix_building">Building WiredTiger</a>.</p>
<p>To build from the WiredTiger GitHub repository requires <a href="http://git-scm.com/">git</a>, <a href="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</a>, <a href="http://www.gnu.org/software/autoconf/automake.html">automake</a>, <a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> and related tools. The standard options for those tools can be specified when configuring and building WiredTiger.</p>
<p>First, clone the repository:</p>
<div class="fragment"><div class="line">git clone git:<span class="comment">//github.com/wiredtiger/wiredtiger.git</span></div></div><!-- fragment --><p>Second, run <code>autogen.sh</code> to create the <code>configure</code> script:</p>
<div class="fragment"><div class="line">cd wiredtiger</div><div class="line">sh autogen.sh</div></div><!-- fragment --><p>Now proceed with <a class="el" href="build-posix.html#posix_building">Building WiredTiger</a>.</p>
<h1><a class="anchor" id="posix_building"></a>
Building WiredTiger</h1>
<p>To build the WiredTiger software on a POSIX system, change directory to the top-level directory, then configure and build the software:</p>
<div class="fragment"><div class="line">cd wiredtiger</div><div class="line">./configure && make</div></div><!-- fragment --><p>To rebuild from scratch, discard any previous configuration by cleaning out the build area:</p>
<div class="fragment"><div class="line">make distclean</div></div><!-- fragment --><p>To see additional configuration options, run:</p>
<div class="fragment"><div class="line">./configure --help</div></div><!-- fragment --><p>WiredTiger uses <a href="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</a> <a href="http://www.gnu.org/software/autoconf/automake.html">automake</a>, and <a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> to create the configure script and Makefiles. The standard options for those tools can be specified when configuring and building WiredTiger.</p>
<h1><a class="anchor" id="posix_installing"></a>
Installing WiredTiger</h1>
<p>The WiredTiger software consists of a library and a single standalone utility.</p>
<p>WiredTiger's distribution follows the GNU Coding Standards installation guidelines, and by default WiredTiger builds and installs four versions of the library in <code>/usr/local/lib</code>. For example:</p>
<div class="fragment"><div class="line">file /usr/local/lib/libwiredtiger*</div><div class="line">/usr/local/lib/libwiredtiger-1.0.0.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped</div><div class="line">/usr/local/lib/libwiredtiger.a: current ar archive</div><div class="line">/usr/local/lib/libwiredtiger.la: libtool library file</div><div class="line">/usr/local/lib/libwiredtiger.so: symbolic link to `libwiredtiger-1.0.0.so<span class="stringliteral">'</span></div></div><!-- fragment --><p>WiredTiger uses <a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> to build the libraries. By default, both shared and static libraries are built. To build only static libraries, configure WiredTiger using the <code>–disable-shared</code> argument. To build only shared libraries, configure using WiredTiger using the <code>–disable-static</code> argument.</p>
<p>In addition, WiredTiger installs a standalone utility program named <code>wt</code>. By default, this utility is installed in <code>/usr/local/bin/wt</code>.</p>
<p>To install WiredTiger:</p>
<div class="fragment"><div class="line">make install</div></div><!-- fragment --><p>To uninstall WiredTiger:</p>
<div class="fragment"><div class="line">make uninstall</div></div><!-- fragment --><p>To install WiredTiger's libraries or binaries into alternate locations, use the configuration or installation options described in the <a href="http://www.gnu.org/prep/standards/">GNU coding standards</a> documentation. For example, to install the libraries and binaries into a different location:</p>
<div class="fragment"><div class="line">./configure --prefix=/c/wiredtiger</div></div><!-- fragment --><h1><a class="anchor" id="posix_configure"></a>
Configuring WiredTiger</h1>
<p>The WiredTiger software supports some additional configuration options:</p>
<dl class="section user"><dt><code>–enable-attach</code> </dt><dd>Configure WiredTiger to sleep and wait for a debugger to attach on failure. <b>DO NOT</b> configure this option in production environments.</dd></dl>
<dl class="section user"><dt><code>–enable-diagnostic</code> </dt><dd>Configure WiredTiger to perform various run-time diagnostic tests. <b>DO NOT</b> configure this option in production environments.</dd></dl>
<dl class="section user"><dt><code>–enable-java</code> </dt><dd>Build the WiredTiger Java API.</dd></dl>
<dl class="section user"><dt><code>–enable-lz4</code> </dt><dd>Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a> compression; see <a class="el" href="compression.html">Compressors</a> for more information.</dd></dl>
<dl class="section user"><dt><code>–enable-python</code> </dt><dd>Build the WiredTiger <a href="http://www.python.org">Python</a> API.</dd></dl>
<dl class="section user"><dt><code>–enable-snappy</code> </dt><dd>Configure WiredTiger for <a href="http://code.google.com/p/snappy/">snappy</a> compression; see <a class="el" href="compression.html">Compressors</a> for more information.</dd></dl>
<dl class="section user"><dt><code>–enable-zlib</code> </dt><dd>Configure WiredTiger for <a href="http://www.zlib.net/">zlib</a> compression; see <a class="el" href="compression.html">Compressors</a> for more information.</dd></dl>
<dl class="section user"><dt><code>–enable-zstd</code> </dt><dd>Configure WiredTiger for <a href="https://github.com/facebook/zstd">Zstd</a> compression; see <a class="el" href="compression.html">Compressors</a> for more information.</dd></dl>
<dl class="section user"><dt>–with-builtins</dt><dd>Configure WiredTiger to include support for extensions in the main library. This avoids requiring additional libraries for supported extensions. Currently supported options are <code>lz4</code>, <code>snappy</code>, <code>zlib</code> and <code>zstd</code>.</dd></dl>
<dl class="section user"><dt>–with-python-prefix</dt><dd>Configure WiredTiger to install Python libraries to a non-standard Python install location.</dd></dl>
<dl class="section user"><dt>–with-spinlock[=pthread, pthread_adaptive, gcc]</dt><dd>Configure WiredTiger to use a specific mutex type for serialization; options are <code>pthread</code> (the default, which configures WiredTiger to use POSIX 1003.1c pthread mutexes), <code>pthread_adaptive</code> (which configures WiredTiger to use POSIX 1003.1c pthread mutexes configured to be adaptive (where that functionality is available), or <code>gcc</code> (which configures WiredTiger to use gcc-based spinlocks).</dd></dl>
<h1><a class="anchor" id="posix_compiler"></a>
Changing compiler or loader options</h1>
<p>To change the compiler or loader behavior during the build, use the <code>CC</code>, <code>CFLAGS</code>, <code>LDFLAGS</code>, or <code>LIBS</code> environment variables:</p>
<dl class="section user"><dt><code>CC</code> </dt><dd>The compiler. </dd></dl>
<dl class="section user"><dt><code>CFLAGS</code> </dt><dd>Compiler flags. </dd></dl>
<dl class="section user"><dt><code>LDFLAGS</code> </dt><dd>Loader flags. </dd></dl>
<dl class="section user"><dt><code>LIBS</code> </dt><dd>Additional libraries.</dd></dl>
<p>For example, to specify a different compiler:</p>
<div class="fragment"><div class="line">env CC=mygcc ./configure</div></div><!-- fragment --><p>By default, WiredTiger builds with the <code>-O3</code> compiler optimization flag unless the <code>–enable-debug</code> configuration option is specified, in which case the <code>-g</code> compiler flag is used instead. For example, to specify a different level of optimization:</p>
<div class="fragment"><div class="line">env CFLAGS=-Os ./configure</div></div><!-- fragment --><p>To specify a different set of include files:</p>
<div class="fragment"><div class="line">env CFLAGS=-I/usr/local/include ./configure</div></div><!-- fragment --><p>To specify an additional library:</p>
<div class="fragment"><div class="line">env LIBS=<span class="stringliteral">"-lrtf -lmin"</span> LDFLAGS=-L/usr/local/lib ./configure</div></div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">Reference Guide</a></li>
<li class="footer">Copyright (c) 2008-2019 MongoDB, Inc. All rights reserved. Contact <a href="mailto:info@wiredtiger.com">info@wiredtiger.com</a> for more information.</li>
</ul>
</div>
</body>
</html>
|