1 This is a readme for building the CouchDb Project.
\r
3 ******* Linux Build Setup *******
\r
5 Your machine will need installed (examples are for debian etch):
\r
7 ICU (http://icu.sourceforge.net/)
\r
8 apt-get install libicu34
\r
9 apt-get install libicu34-dev
\r
11 Erlang OTP (http://erlang.org/)
\r
12 apt-get install erlang
\r
14 Note: This project will build without modification with Erlang OTP R11B-1. If you do not have that version, you will get build errors and you will need to edit the package version numbers in CouchDb/couch.rel to match the ones in your Erlang install. (a future version of the build will allow any recent version of Erlang without edits)
\r
17 apt-get install free-java-sdk
\r
19 Then execute build.sh.
\r
21 It should end with the message:
\r
22 CouchDb as been built successfully!
\r
24 Then become root or use sudo to install CouchDb
\r
25 ./build.sh --install=/usr/local --with-erlang=/usr/lib/erlang/lib
\r
27 The path after --install= can be anywhere you want. The installer automatically adds a couchdb directory to the path. With
\r
28 /usr/local CouchDb will installed into /usr/local/couchdb.
\r
30 The path after --with-erlang= needs to poing to the
\r
31 directory where your erlang installation put all other erlang libraries. If you are not sure how to
\r
32 find it, look for a directory that contains directories that are named like package-x.y.z (stdlib-1.14.1).
\r
34 * Patch the built-in INETS HTTP server. Instructions at "How to Patch the Erlang Inets facility code" below.
\r
37 go to your installation directory (/usr/local/couchdb) and run ./bin/startCouchDb.sh
\r
38 if you don't want to run CouchDb as root, make sure to chown the installation directory to the user that
\r
39 executes ./bin/startCouchDb.sh.
\r
41 If an interactive Erlang shell shows up on the console and displays "CouchDb has started. Time to Relax.", relax.
\r
42 Then point your web browser to http://localhost:8888/$utils/index.html to create and administer the databases in CouchDb.
\r
45 ******* Windows Build Setup ********
\r
47 To Build Couch, you will need:
\r
49 * Microsoft Visual Studio .NET 2003
\r
51 * Java JRE installed and a java executable on the path (you probably already have this).
\r
53 * Install and build IBM's ICU (http://icu.sourceforge.net/).
\r
54 Set the environment variable ICU_ROOT to point the root of the ICU install, just below the "lib" and "include" directories:
\r
57 * Erlang Runtime (http://erlang.org/download.html)
\r
59 Note: This project will build without modification with Erlang OTP R11B-1. If you do not have that version, you will get build errors and you will need to edit the package version numbers in CouchDb/couch.rel to match the ones in your Erlang install. (a future version of the build will allow any recent version of Erlang without edits)
\r
61 * set the ERLANG_ROOT environment variable to point the erlang root dir:
\r
62 ERLANG_ROOT=:\Program Files\erl5.5.1\
\r
64 * set the ERTS_ROOT environment variable to point the ERTS directory:
\r
65 ERTS_ROOT=C:\Program Files\erl5.5.1\erts-5.5.1
\r
67 * Patch the built-in INETS HTTP server. Instructions at "How to Patch the Erlang Inets facility code" below.
\r
69 Then execute build_win_kit.cmd to create a full couchdb install kit
\r
73 ******* How to Patch the Erlang Inets facility code ********
\r
76 Add these function heads at line 73 in \inets-X.X.X\src\httpd_request.erl:
\r
79 validate("PUT", Uri, "HTTP/1." ++ _N) ->
\r
81 validate("DELETE", Uri, "HTTP/1." ++ _N) ->
\r
85 NOTE: there is also a http_request.erl file (no "d" in the name). Do not confuse this with httpd_request.erl
\r
87 Then compile the file from the Erlang shell.
\r
90 > c("C:\\Program Files\\erl5.5.1\\lib\\inets-4.7.5\\src\\httpd_request.erl",
\r
91 {outdir,"C:\\Program Files\\erl5.5.1\\lib\\inets-4.7.5\\ebin\\"}).
\r
94 > c("/user/lib/erlang/erl5.5.1/lib/inets-4.7.5/src/httpd_request.erl",
\r
95 {outdir,"/user/lib/erlang/erl5.5.1/lib/inets-4.7.5/ebin/"}).
\r
97 If that completes successfully you have a patched system!
\r
101 ******* New Version Checklist *******
\r
103 1. Update version info in files: version CouchDb/couch.rel CouchDb/couch.app
\r
104 2. Add important information to dist/common/readme.txt
\r