Differences between revisions 5 and 6
Revision 5 as of 2008-06-20 14:18:36
Size: 3680
Editor: 87-194-183-69
Comment:
Revision 6 as of 2008-06-20 14:19:20
Size: 3680
Editor: 87-194-183-69
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
== Dependancies == == Dependencies ==

CouchDB does not natively install on Windows but it is possible to install it by hand.

Please update this guide as needed, we aim to collect feedback and roll the procedure into the official build.

Dependencies

You will need the following software installed on your system:

Base Installation

After installing Erlang and you should having something similar to:

C:\Program Files\erl5.6.3

Copy the whole CouchDB source tree to:

C:\Program Files\erl5.6.3\lib\couchdb-0.8.0

Make the following empty directory:

C:\Program Files\erl5.6.3\lib\mochiweb-0.01\ebin

From ICU copy icu*.dll and libeay32.dll to:

C:\Program Files\erl5.6.3\erts-5.6.2\bin

From SpiderMonkey copy js32.dll and jsshell.exe to:

C:\Program Files\erl5.6.3\erts-5.6.2\bin

C Compilation

couchdb/couch_erl_driver.c

This is a wrapper to provide ICU features to CouchDB.

The simplest way to build a DLL is to create a Win32 DLL project in an IDE, add couch_erl_driver.c into the project, and change project settings to include the Erlang ERTS and ICU4C header paths.

Make the following empty directory:

C:\Program Files\erl5.6.3\lib\couchdb-0.8.0\priv

Copy the DDL to:

C:\Program Files\erl5.6.3\lib\couchdb-0.8.0\priv\couch_erl_driver.dll

couchdb/couch_js.c

This is a wrapper to provide UTF-8 and buffering improvements to SpiderMonkey.

@@ It is currently unknown how to build this on Windows.

For now, you can use SpiderMonkey's jsshell.exe as the JavaScript View Server.

Erlang Compilation

Create a the following file:

C:\Program Files\erl5.6.3\lib\couchdb-0.8.0\src\Emakefile

Add the following content:

{'./couchdb/*', [{outdir,"../ebin"}]}.
{'./mochiweb/*', [{outdir,"../../mochiweb-0.01/ebin"}]}.

Launch erl (or werl) and execute the following command to change working directory:

cd("C:/Program Files/erl5.6.3/lib/couchdb-0.8.0/src").

Execute this command to compile CouchDB:

make:all().

Configuring

Copy the following file:

C:\Program Files\erl5.6.3\lib\couchdb-0.8.0\etc\couchdb\couch.ini.tpl.in

To this location:

C:/Program Files/erl5.6.3/bin/couch.ini

Edit the file to look something like this:

[Couch]

ConsoleStartupMsg=Apache CouchDB is starting.

DbRootDir=C:/Path/To/Database/Directory

Port=5984

BindAddress=127.0.0.1

DocumentRoot=C:/Program Files/erl5.6.3/lib/couchdb-0.8.0/share/www

LogFile=C:/Path/To/Log/Directory

UtilDriverDir=C:/Program Files/erl5.6.3/lib/couchdb-0.8.0/priv/couch_erl_driver.dll

LogLevel=info

[Couch Query Servers]

; this should be on one line
javascript=jsshell -f "C:/Program Files/erl5.6.3/lib/couchdb-0.8.0/share/server/main.js"

Make sure that the DbRootDir exists and that the LogFile can be created.

Running

Launch erl (or werl) and execute the following command:

couch_server:start().

To check that everything has worked point your web browser to [http://localhost:5984/_utils/index.html] and run the test suite.