You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove redundant install instructions from README and combine all instructions
in installing.page. Improve the instructions (CDRIVER-722) especially for Open
SSL on El Capitan (CDRIVER-941).
<p>The following instructions are for UNIX-like systems such as GNU/Linux, FreeBSD, and Solaris. To build on Windows, see the instructions for <link xref="installing#building-windows">Building on Windows</link>.</p>
59
-
60
-
<p>The most recent release of libmongoc is 1.2.0 and can be <link href="https://github.com/mongodb/mongo-c-driver/releases/download/1.2.0/mongo-c-driver-1.2.0.tar.gz">downloaded here</link>. The following snippet will download and extract the current release of the driver.</p>
<p>Minimal dependencies are needed to build the MongoDB C driver. Optionally, if you want Kerberos (GSSAPI) or SSL support, you need to install <code>libsasl2</code> and <code>OpenSSL</code> libraries and development headers respectively.</p>
67
-
68
-
<note>
69
-
<p>
70
-
In MongoDB 3.0 and later the default authentication mechanism is SCRAM-SHA-1.
71
-
The MongoDB C Driver must be built with OpenSSL to use SCRAM-SHA-1 authentication,
72
-
since the driver uses hash algorithms from the OpenSSL library to implement SCRAM-SHA-1,
73
-
even if it connects to MongoDB over a non-SSL connection.
74
-
</p>
75
-
</note>
76
-
77
-
<p>Make sure you have access to a <link xref="installing#supported-platforms">supported toolchain</link> such as GCC, Clang, Solaris Studio, or MinGW. Optionally, <code>pkg-config</code> can be used if your system supports it to simplify locating proper compiler and linker arguments when compiling your program.</p>
78
-
79
-
<p>The following will configure for a typical 64-bit Linux system such as RedHat Enterprise Linux 6 or CentOS 6. Note that not all systems place 64-bit libraries in <code>/usr/lib64</code>. Check your system to see what the convention is if you are building 64-bit versions of the library.</p>
<p>If you require <code>SSL</code> add <code>--enable-ssl</code> to the above configuration. This will require the <code>openssl-devel</code> on RedHat Entrprise Linux. Other Linux-based operating systems may have another name for this package such as <code>libssl-dev</code> on Debian.</p>
85
-
</note>
86
-
87
-
<note style="advanced">
88
-
<p>If you require <code>Kerberos</code> add <code>--enable-sasl</code> to the above configuration. This will require the <code>cyrus-sasl-devel</code> on RedHat Entrprise Linux. Other Linux-based operating systems may have another name for this package.</p>
89
-
</note>
90
-
91
-
<p>If <code>configure</code> completed successfully, you'll see something like the following describing your build configuration.</p>
92
-
56
+
<title>Building on Unix</title>
57
+
<section id="unix-prerequisites">
58
+
<title>Prerequisites</title>
59
+
<p>OpenSSL is required for authentication or for SSL connections to MongoDB. Kerberos or LDAP support requires Cyrus SASL.</p>
60
+
<p>To install all optional dependencies on RedHat / Fedora:</p>
<screen>$ su -c 'pkg install pkgconf openssl cyrus-sasl2'</screen>
66
+
</section>
67
+
<section id="unix-build">
68
+
<title>Building from a release tarball</title>
69
+
<p>Unless you intend on contributing to the mongo-c-driver, you will want to build from a release tarball.</p>
70
+
<p>The most recent release of libmongoc is 1.2.0 and can be <link href="https://github.com/mongodb/mongo-c-driver/releases/download/1.2.0/mongo-c-driver-1.2.0.tar.gz">downloaded here</link>. The following snippet will download and extract the driver, and configure it:</p>
<p>You can optionally build code objects in parallel using the <code>-j</code> option to GNU make. Some implementations of <code>make</code> do not support this option, such as Sun's make on Solaris. To build in parallel on an 8 core machine, you might use:</p>
<p>To install the driver, we use <code>make</code> with the <code>install</code> target.</p>
122
-
123
-
<screen><output style="prompt">$ </output><input>sudo make install</input></screen>
124
-
125
-
<note>
126
-
<p>On systems that do not support the <code>sudo</code> command, we can use <code>su -c 'make install'</code>.</p>
127
-
</note>
94
+
Generate man pages : no
95
+
Install man pages : no</screen>
96
+
<p>mongo-c-driver contains a copy of libbson as a git submodule, in case your system does not already have libbson installed. The configure script will detect if libbson is not installed and use the bundled libbson.</p>
97
+
98
+
<screen>
99
+
$ make
100
+
$ sudo make install
101
+
</screen>
102
+
</section>
103
+
<section id="unix-build-git">
104
+
<title>Building from git</title>
105
+
<p>To build an unreleased version of the driver from git requires additional dependencies.</p>
<p>To install the XCode Command Line Tools, just type <code>xcode-select --install</code> in the Terminal and follow the instructions.</p>
129
+
</section>
130
+
<section id="openssl-el-capitan">
131
+
<title>OpenSSL support on El Capitan</title>
132
+
<p>Beginning in OS X 10.11 El Capitan, OS X no longer includes the OpenSSL headers. To build the driver with SSL on El Capitan and later, first <link href="http://brew.sh/">install Homebrew according to its instructions</link>, then:</p>
<p>Building on Windows requires Windows Vista or newer and Visual Studio 2010 or newer. Additionally, <code>cmake</code> is required to generate Visual Studio project files.</p>
0 commit comments