mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 22:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@276454 c90b9560-bf6c-de11-be94-00142212c4b1
109 lines
2.5 KiB
XML
109 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
|
|
<section xml:id="mongo.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
&reftitle.install;
|
|
<!-- There are various PECL related entities in language-snippets.ent -->
|
|
<para>
|
|
To get the source:
|
|
<screen>
|
|
$ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pecl/mongo
|
|
# password: phpfi
|
|
</screen>
|
|
</para>
|
|
|
|
<para>
|
|
To build, use:
|
|
<screen>
|
|
$ cd pecl/mongo
|
|
$ ./configure --enable-mongo
|
|
$ make
|
|
</screen>
|
|
<table>
|
|
<title>Options used by configure</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>Option</entry>
|
|
<entry>Default</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>--with-mongodb=/path/to/mongodb</entry>
|
|
<entry>/usr/local</entry>
|
|
<entry>Path to local mongodb install</entry>
|
|
</row>
|
|
<row>
|
|
<entry>--with-boost=/path/to/boost/libs</entry>
|
|
<entry>/usr/lib/</entry>
|
|
<entry>Path to boost libraries</entry>
|
|
</row>
|
|
<row>
|
|
<entry>--enable-64</entry>
|
|
<entry>no</entry>
|
|
<entry>Compile for 64-bit architecture</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
<para>
|
|
Note for Mac OS X users: Web Sharing uses 64-bit PHP, however, the command line PHP uses 32-bit.
|
|
Therefore, you have to use --enable-64 to force command-line PHP to build an Apache-compliant
|
|
PHP extension.
|
|
</para>
|
|
|
|
<para>
|
|
To install:
|
|
<screen>
|
|
$ sudo cp modules/mongo.so /path/to/extension_dir
|
|
$ sudo cp src/php/* /path/to/php/includes/mongo/
|
|
</screen>
|
|
</para>
|
|
|
|
<para>
|
|
php.ini settings:
|
|
To load this extension on startup, add a line:
|
|
<screen>
|
|
extension=mongo.so
|
|
</screen>
|
|
|
|
You should also add some default settings:
|
|
<screen>
|
|
[mongo]
|
|
; Default host for mongo connection
|
|
mongo.default_host = localhost
|
|
|
|
; Default port for mongo database
|
|
mongo.default_port = 27017
|
|
|
|
; If the driver should reconnect to mongo
|
|
mongo.auto_reconnect = true
|
|
</screen>
|
|
</para>
|
|
</section>
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|