1
.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
2
.. use this file except in compliance with the License. You may obtain a copy of
5
.. http://www.apache.org/licenses/LICENSE-2.0
7
.. Unless required by applicable law or agreed to in writing, software
8
.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
.. License for the specific language governing permissions and limitations under
16
=======================
17
Installation on Windows
18
=======================
20
There are two ways to install CouchDB on Windows.
22
Installation from binaries
23
==========================
25
This is the simplest way to go.
27
#. Get `the latest Windows binaries`_ from `CouchDB web site`_.
28
Old releases are available at `archive`_.
30
#. Follow the installation wizard steps:
32
- Next on "Welcome" screen
33
- Accept the License agreement
34
- Select the installation directory
35
- Specify "Start Menu" group name
36
- Approve that you'd like to install CouchDB as service and let him been
37
started automatically after installation (probably, you'd like so)
38
- Verify installation settings
41
#. `Open up Futon`_ (if you hadn't selected autostart CouchDB after
42
installation, you have to start it first manually)
44
#. It's time to Relax!
47
In some cases you might been asked to reboot Windows to complete
48
installation process, because of using on different Microsoft Visual C++
51
.. note:: **Upgrading note**
53
It's recommended to uninstall previous CouchDB version before upgrading,
54
especially if the new one is built against different Erlang release.
55
The reason is simple: there may be leftover libraries with alternative or
56
incompatible versions from old Erlang release that may create conflicts,
57
errors and weird crashes.
59
In this case, make sure you backup of your `local.ini` config and CouchDB
62
.. _Open up Futon: http://localhost:5984/_utils
63
.. _CouchDB web site: http://couchdb.org/
64
.. _archive: http://archive.apache.org/dist/couchdb/binary/win/
65
.. _the latest Windows binaries: http://couchdb.org/#download
68
Installation from sources
69
=========================
71
If you're Windows geek, this section is for you!
76
* There is a `troubleshooting guide`_.
77
* There is a `wiki`_ for general documentation.
78
* And some `Windows-specific tips`_.
79
* There are collection of `friendly mailing lists`_.
81
Please work through these in order if you experience any problems.
83
.. _troubleshooting guide: http://wiki.apache.org/couchdb/Troubleshooting
84
.. _wiki: http://wiki.apache.org/couchdb
85
.. _friendly mailing lists: http://couchdb.apache.org/community/lists.html
86
.. _Windows-specific tips: http://wiki.apache.org/couchdb/Quirks_on_Windows
91
You should have the following installed:
93
* `Erlang OTP (>=14B01, <R17) <http://erlang.org/>`_
94
* `ICU (>=4.*) <http://icu-project.org/>`_
95
* `OpenSSL (>0.9.8r) <http://www.openssl.org/>`_
96
* `Mozilla SpiderMonkey (=1.8.5) <http://www.mozilla.org/js/spidermonkey/>`_
97
* `Cygwin <http://www.cygwin.com/>`_
98
* `Microsoft SDK 7.0 or 7.1 <http://www.microsoft.com/en-us/download/details.aspx?id=8279>`_
99
* `libcurl (>=7.20) <http://curl.haxx.se/libcurl/>`_
100
* `help2man <http://www.gnu.org/s/help2man/>`_
101
* `Python (>=2.7) for docs <http://python.org/>`_
102
* `Python Sphinx (>=1.1.3) <http://pypi.python.org/pypi/Sphinx>`_
104
You will only need libcurl if you plan to run the JavaScript test suite. And
105
help2man is only need if you plan on installing the CouchDB man pages.
106
Python and Sphinx are only required for building the online documentation.
111
* When installing Cygwin, be sure to select all the `development` tools.
113
* When installing Erlang, you must build it from source.
115
* The CouchDB build requires a number of the Erlang build scripts.
117
* All dependent libraries should be built with the same version of
120
* Do not try to link against libraries built with, or included in,
121
Cygwin or MingW. They are not compatible with the Erlang/OTP or CouchDB
124
* ICU version 4.6 and later will build cleanly using MSBuild.
126
* Python and Sphinx are optional for building the online documentation.
127
Use cygwin-provided Python and install Sphinx via easy_install or pip.
128
Further information is here http://pypi.python.org/pypi/setuptools#id4
133
Before starting any Cygwin terminals, run::
137
To set up your environment, run::
139
[VS_BIN]/vcvars32.bat
141
Replace ``[VS_BIN]`` with the path to your Visual Studio `bin` directory.
145
* The ``which link`` command points to the Microsoft linker.
147
* The ``which cl`` command points to the Microsoft compiler.
149
* The ``which mc`` command points to the Microsoft message compiler.
151
* The ``which mt`` command points to the Microsoft manifest tool.
153
* The ``which nmake`` command points to the Microsoft make tool.
155
If you do not do this, the build may fail due to Cygwin ones found in `/usr/bin`
161
You must include Win32 OpenSSL, built statically from source. Use
162
exactly the same version as required by the Erlang/OTP build process.
164
However, you can skip the GUI tools by running::
166
echo "skipping gs" > lib/gs/SKIP
168
echo "skipping ic" > lib/ic/SKIP
170
echo "skipping jinterface" > lib/jinterface/SKIP
172
Follow the rest of the Erlang instructions as described.
176
./otp_build release -a
180
./release/win32/Install.exe -s
182
This will set up the release/win32/bin directory correctly. The CouchDB
183
installation scripts currently write their data directly into this
186
To set up your environment for building CouchDB, run::
188
eval `./otp_build env_win32`
190
To set up the `ERL_TOP` environment variable, run::
192
export ERL_TOP=[ERL_TOP]
194
Replace ``[ERL_TOP]`` with the Erlang source directory name.
196
Remember to use `/cygdrive/c/` instead of `c:/` as the directory prefix.
198
To set up your path, run::
200
export PATH=$ERL_TOP/release/win32/erts-5.8.5/bin:$PATH
202
If everything was successful, you should be ready to build CouchDB.
209
Note that `win32-curl` is only required if you wish to run the developer
212
The documentation step may be skipped using ``--disable-docs`` if you wish.
214
Once you have satisfied the dependencies you should run::
217
--with-js-include=/cygdrive/c/path_to_spidermonkey_include \
218
--with-js-lib=/cygdrive/c/path_to_spidermonkey_lib \
219
--with-win32-icu-binaries=/cygdrive/c/path_to_icu_binaries_root \
220
--with-erlang=$ERL_TOP/release/win32/usr/include \
221
--with-win32-curl=/cygdrive/c/path/to/curl/root/directory \
222
--with-openssl-bin-dir=/cygdrive/c/openssl/bin \
223
--with-msvc-redist-dir=/cygdrive/c/dir/with/vcredist_platform_executable \
226
--prefix=$ERL_TOP/release/win32
228
This command could take a while to complete.
230
If everything was successful you should see the following message::
232
You have configured Apache CouchDB, time to relax.
236
To install CouchDB you should run::
240
If everything was successful you should see the following message::
242
You have installed Apache CouchDB, time to relax.
246
To build the .exe installer package, you should run::
250
Alternatively, you may run CouchDB directly from the build tree, but
251
to avoid any contamination do not run `make dist` after this.
256
You can start the CouchDB server by running::
258
$ERL_TOP/release/win32/bin/couchdb.bat
260
When CouchDB starts it should eventually display the following message::
262
Apache CouchDB has started, time to relax.
266
To check that everything has worked, point your web browser to::
268
http://127.0.0.1:5984/_utils/index.html
270
From here you should run the verification tests in Firefox.
275
`Glazier: Automate building of CouchDB from source on Windows <https://github.com/dch/glazier>`_