Files
Yasuhiro KIMURA 9678929700 Update to 18.1.40
2020-07-24 01:10:28 +09:00

397 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>Chapter 7.  Building Third Party APIs</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
<link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" />
<link rel="prev" href="build_vxworks_faq.html" title="VxWorks FAQ" />
<link rel="next" href="build_nodejs.html" title="Building Node.js" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 18.1.40</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 7.  Building Third Party APIs </th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="build_vxworks_faq.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="build_nodejs.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="build_thirdparty"></a>Chapter 7.  Building Third Party APIs </h2>
</div>
</div>
</div>
<div class="toc">
<p>
<b>Table of Contents</b>
</p>
<dl>
<dt>
<span class="sect1">
<a href="build_thirdparty.html#build_goapi">Building the Go API</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#install-bdb">Install Oracle Berkeley DB</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#build_gobdb">Build Go Berkeley DB (go-bdb)</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#test_gobdb">Test Go Berkeley DB (go-bdb)</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#additional_information">Additional Information</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="sect1">
<a href="build_nodejs.html">Building Node.js</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="sect2">
<a href="build_nodejs.html#additional_info-node.js">Additional Information</a>
</span>
</dt>
</dl>
</dd>
</dl>
</div>
<p>
This chapter provides information on building third party APIs. See the sections below:
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
<a class="xref" href="build_thirdparty.html#build_goapi" title="Building the Go API">Building the Go API</a>
</p>
</li>
<li>
<p>
<a class="xref" href="build_nodejs.html" title="Building Node.js">Building Node.js</a>
</p>
</li>
</ul>
</div>
<p>
</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="build_goapi"></a>Building the Go API</h2>
</div>
</div>
</div>
<div class="toc">
<dl>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#install-bdb">Install Oracle Berkeley DB</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#build_gobdb">Build Go Berkeley DB (go-bdb)</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#test_gobdb">Test Go Berkeley DB (go-bdb)</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_thirdparty.html#additional_information">Additional Information</a>
</span>
</dt>
</dl>
</div>
<p>
To install Go bindings for Oracle Berkeley DB, get a <code class="literal">go-bdb</code> package
from <a class="ulink" href="https://orahub.oraclecorp.com/nosql-bdb-dev/go-bdb" target="_top">https://orahub.oraclecorp.com/nosql-bdb-dev/go-bdb</a>. You will need
an Oracle SSO account. Download your preferred package format; then install it following
the steps mentioned in the sections below.
</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="install-bdb"></a>Install Oracle Berkeley DB</h3>
</div>
</div>
</div>
<p>
Download Berkeley DB 6.2.32 or higher from
<a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</a>
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
<span class="emphasis">
<em>Windows</em>
</span>
</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>Build Berkeley DB from the source code using Minimalist GNU for
Windows (MinGW). The
easiest way to get access to MinGW is to download and install
MinGW-64 (<a class="ulink" href="https://sourceforge.net/projects/mingw-w64/" target="_top">https://sourceforge.net/projects/mingw-w64/</a>) and MSYS
(<a class="ulink" href="https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/" target="_top">https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/</a>)
</p>
<p>
For more information on MSYS and MinGW, see <a class="ulink" href="http://www.mingw.org/wiki/MSYS" target="_top">http://www.mingw.org/wiki/MSYS</a>
</p>
</li>
<li>
<p>
Start a MSYS terminal and change into the unpacked
<code class="literal">db-6.2.32</code> directory.
</p>
</li>
<li>
<p>
Execute the following command in the
<code class="literal">db-6.2.32/build_unix</code> directory.
</p>
<pre class="programlisting">../dist/configure --prefix=/c/bdb/install
--enable-cxx --enable-mingw --host=x86_64-w64-mingw32
make
make install</pre>
<p>
</p>
</li>
<li>
<p>
Set the following environment variables:
</p>
<pre class="programlisting">set CPATH=C:\bdb\install\include
set LIBRARY_PATH=C:\bdb\install\lib
set PATH=C:\bdb\install\lib;%PATH%</pre>
<p>
</p>
</li>
</ol>
</div>
</li>
<li>
<p>
<span class="emphasis">
<em>Linux/Posix</em>
</span>
</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>
Unpack the Berkeley DB source library and change to the directory
<code class="literal">db-6.2.32/build_unix</code>.
</p>
</li>
<li>
<p>
Execute the following command:
</p>
<pre class="programlisting">../dist/configure --prefix=/usr/local/bdb/install --enable-cxx
make
make install</pre>
<p>
</p>
</li>
<li>
<p>
Set the following environment variables:
</p>
<pre class="programlisting">export CPATH=/usr/local/bdb/install/include
export LIBRARY_PATH=/usr/local/bdb/install/lib
export LD_LIBRARY_PATH=/usr/local/bdb/install/lib:$LD_LIBRARY_PATH</pre>
<p>
</p>
</li>
</ol>
</div>
</li>
</ul>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="build_gobdb"></a>Build Go Berkeley DB (go-bdb)</h3>
</div>
</div>
</div>
<div class="orderedlist">
<ol type="1">
<li>
<p>Under your Go installation, change to the directory
<code class="literal">Go/src</code> and add the directory
<code class="literal">orahub.oraclecorp.com/nosql-bdb-dev</code>.
</p>
</li>
<li>
<p>
Change to <code class="literal">orahub.oraclecorp.com/nosql-bdb-dev</code>.
</p>
</li>
<li>
<p>
Choose either of the following options:
</p>
<div class="orderedlist">
<ol type="a">
<li>
<p>Checkout <code class="literal">go-bdb</code> using the command:
</p>
<pre class="programlisting">git clone git@orahub.oraclecorp.com:nosql-bdb-dev/go-bdb</pre>
<p>
</p>
</li>
<li>
<p>
Download a <code class="literal">.zip</code> or <code class="literal">.tar.gz </code> from
<a class="ulink" href="https://orahub.oraclecorp.com/nosql-bdb-dev/go-bdb" target="_top">https://orahub.oraclecorp.com/nosql-bdb-dev/go-bdb</a>
and unpack it into the <code class="literal">orahub.oraclecorp.com/nosql-bdb-dev</code> directory.
</p>
</li>
</ol>
</div>
<p>
</p>
</li>
<li>
<p>Build <code class="literal">go-bdb</code> using the command:
</p>
<pre class="programlisting">go build orahub.oraclecorp.com/nosql-bdb-dev/go-bdb</pre>
<p>
</p>
</li>
</ol>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="test_gobdb"></a>Test Go Berkeley DB (go-bdb)</h3>
</div>
</div>
</div>
<div class="orderedlist">
<ol type="1">
<li>
<p>Change to the examples directory in
<code class="literal">Go/src/orahub.oraclecorp.com/nosql-bdb-dev/go-bdb/_examples</code>.
</p>
</li>
<li>
<p>Change to the directory
<code class="literal">HelloWorld</code>.
</p>
</li>
<li>
<p>Enter the command:
</p>
<pre class="programlisting">go run HelloWorld.go</pre>
<p>
</p>
<p>
If <code class="literal">Hello World!</code> is printed out, then the installation
was successful.
</p>
</li>
</ol>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="additional_information"></a>Additional Information</h3>
</div>
</div>
</div>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
<code class="literal">Go/src/orahub.oraclecorp.com/nosql-bdb-dev/go-bdb/_examples</code> - Examples
of how to use Berkeley DB are located in this directory.
</p>
</li>
<li>
<p>
<code class="literal">HelloWorld</code> - Shows the basics of Berkeley DB, how to create
a database and put and get data.
</p>
</li>
<li>
<p>
<code class="literal">Replication</code> - Shows how to set up a replication group and
replicate data from the master environment to a replica environment.
</p>
</li>
<li>
<p>
<code class="literal">Bulk</code> - Shows how to do bulk inserts and gets.
</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="build_vxworks_faq.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="build_nodejs.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">VxWorks FAQ </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> Building Node.js</td>
</tr>
</table>
</div>
</body>
</html>