-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall.html
146 lines (146 loc) · 11.1 KB
/
install.html
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!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: How to build and install WiredTiger</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="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</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 1.5.0</span>
</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.3.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li><a href="community.html"><span>Community</span></a></li>
<li><a href="license.html"><span>License</span></a></li>
</ul>
</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('install.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">How to build and install WiredTiger </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This section explains how to build and install the WiredTiger software.</p>
<h1><a class="anchor" id="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="install.html#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 the <code>build_posix/reconf</code> script:</p>
<div class="fragment"><div class="line">cd wiredtiger</div>
<div class="line">sh build_posix/reconf</div>
</div><!-- fragment --><p>This creates the <code>configure</code> script, and you can now proceed with <a class="el" href="install.html#building">Building WiredTiger</a>.</p>
<h1><a class="anchor" id="building"></a>
Building WiredTiger</h1>
<p>To build the WiredTiger software on a POSIX-like 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="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="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-bzip2</code> </dt><dd>Configure WiredTiger for <a href="http://www.bzip.org/">bzip2</a> compression; see <a class="el" href="compression.html">Compressors</a> for more information.</dd></dl>
<dl class="section user"><dt><code>–enable-debug</code> </dt><dd>Configure WiredTiger for debugging, including building with the compiler's <code>-g</code> flag. <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-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-verbose</code> </dt><dd>Configure WiredTiger to support the <code>verbose</code> configuration string to <a class="el" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a>.</dd></dl>
<dl class="section user"><dt>–with-spinlock</dt><dd>Configure WiredTiger to use a specific mutex type, options are <code>pthread_mutex</code> (the default, which configures WiredTiger to use POSIX 1003.1c pthread mutexes for serialization) or <code>gcc</code> (which configures WiredTiger to use gcc-based spinlocks for serialization).</dd></dl>
<h1><a class="anchor" id="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-2013 WiredTiger, Inc. All rights reserved. Contact <a href="mailto:[email protected]">[email protected]</a> for more information.</li>
</ul>
</div>
</body>
</html>