Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (71 sloc) 3.75 kb
77d6543 Benoit Chesneau put travis status on top
benoitc authored
1 rcouch [![Build Status](https://secure.travis-ci.org/refuge/rcouch.png)](http://travis-ci.org/refuge/rcouch)
2 ------------------------------------------------------------------------------------------------------------
aa7f364 Benoit Chesneau make changes needed to build rcouch.
benoitc authored
3
4 rcouch is a static distribution of couchdb using rebar. It is an
83dea8d Benoit Chesneau new couch_core
benoitc authored
5 extraction of the refuge code to ease the distribution of couchdb.
aa7f364 Benoit Chesneau make changes needed to build rcouch.
benoitc authored
6
7 Based on the couchdb code it is tagged from time to time for stability
8 purpose. At some point some supported branch may appear.
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
9
42b1f17 Benoit Chesneau update readme. rcouch is back :
benoitc authored
10 RCouch differs from refuge by only focusing on Apache CouchDB. It won't
11 contain any of the refuge features like P2P nodes handling, ... .
12 Internally we are using it to test couchdb and as an example on how to
13 embed couchdb in your own applications.
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
14
83dea8d Benoit Chesneau new couch_core
benoitc authored
15 RCouch is brought you by the [Refuge project](http://refuge.io).
16
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
17 ## Features:
18
aa7f364 Benoit Chesneau make changes needed to build rcouch.
benoitc authored
19 - Apache CouchDB based
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
20 - Geocouch integrated
aa7f364 Benoit Chesneau make changes needed to build rcouch.
benoitc authored
21 - rebar
83dea8d Benoit Chesneau new couch_core
benoitc authored
22 - relocatable
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
23 - Fully opensource. All the sources are on refuge GIT repository
24 (http://github.com/refuge) under Apache License 2.
25
26ee939 Benoit Chesneau improve README
benoitc authored
26 ## Requirements
d6ca306 Benoit Chesneau rebared version of couchdb
benoitc authored
27
26ee939 Benoit Chesneau improve README
benoitc authored
28 - OS supported: Linux, OSX, BSDs (windows support is coming)
29 - Erlang R14
30 - Curl
109e5a0 Benoit Chesneau zip is a reauirement to build spidermonkey.
benoitc authored
31 - zip (during build)
26ee939 Benoit Chesneau improve README
benoitc authored
32 - ICU (if not built statically)
81ff816 Benoit Chesneau remove rebar from the rcouch source & make it a requirement in the
benoitc authored
33 - Latest version of [rebar](http://github.com/basho/rebar) installed on
34 your system.
26ee939 Benoit Chesneau improve README
benoitc authored
35
36 ## Installation
37
38 Installation is pretty simple. Just run the command line:
39
40 $ make rel
41
aa7f364 Benoit Chesneau make changes needed to build rcouch.
benoitc authored
42 and it will generate a couch folder in rel/couch. This release is
26ee939 Benoit Chesneau improve README
benoitc authored
43 fully relocatable, so you can put it where you want on your system.
44
45
46 To create package for your system run `make package` . For now we build
47 packages for OSX, Debian, Redhat & Solaris.
7efb661 Benoit Chesneau notes about building a fully relocatable package.
benoitc authored
48
60e0115 Benoit Chesneau update readme
benoitc authored
49 ## Build rcouchx
50
51 rcouchx is a macosx interface for rcouch based on [the excellent
52 work](https://github.com/janl/couchdbx-app) of Jan:
53
54 ![screenshot of rcouchx](http://benoitc.im/vrac/rcouchx/Screen%20Shot%202012-04-20%20at%2011.55.48%20PM_thumb.png)
55
56
a9ec2a6 Benoit Chesneau typo
benoitc authored
57 To build it, run the command line:
60e0115 Benoit Chesneau update readme
benoitc authored
58
59 $ make rcouchx
60
61 Then launch the `rcouchx.app` application.
62
63
7efb661 Benoit Chesneau notes about building a fully relocatable package.
benoitc authored
64 ##Notes on building a truly distributable package
65
66 The package built above will still depend on some libraries from your
67 system, so additional work has to be done to distribute it to
68 older/newer systems.
69
70 1. CouchDB will depend on the ICU library version that was present in
71 your system at build time. To easily bundle this library with the
72 package, build with:
73
74 $ make rel USE_STATIC_ICU=1
75
76 1. Check whether your package depends on Ncurses:
77
ff37aa1 Benoit Chesneau fix READDME.
benoitc authored
78 $ ldd ./rel/rcouch/erts-*/bin/erlexec|grep ncurses
7efb661 Benoit Chesneau notes about building a fully relocatable package.
benoitc authored
79
80 If it does, copy the .so file to ./rel/myapp/lib/ or rebuild Erlang
81 without this dependency.
82
83 1. Decide whether you need SSL support in your package and check whether it
84 depends on OpenSSL:
85
ff37aa1 Benoit Chesneau fix READDME.
benoitc authored
86 $ ldd ./rel/rcouch/lib/ssl-*/priv/bin/ssl_esock|grep 'libcrypto\|libssl'
7efb661 Benoit Chesneau notes about building a fully relocatable package.
benoitc authored
87
ff37aa1 Benoit Chesneau fix READDME.
benoitc authored
88 If it does, copy the .so file to ./rel/rcouch/lib/ or rebuild Erlang
7efb661 Benoit Chesneau notes about building a fully relocatable package.
benoitc authored
89 without this dependency.
90
91 If you copied any .so files in the last 2 steps, run this command, so
92 that your app can find the libraries:
93
ff37aa1 Benoit Chesneau fix READDME.
benoitc authored
94 $ sed -i '/^RUNNER_USER=/a\\nexport LD_LIBRARY_PATH="$RUNNER_BASE_DIR/lib"' ./rel/rcouch/bin/rcouch
a44d878 Benoit Chesneau instructions to bind rcouch on port 80 as a normal user.
benoitc authored
95
96
a9ec2a6 Benoit Chesneau typo
benoitc authored
97 ## Binding port 80
a44d878 Benoit Chesneau instructions to bind rcouch on port 80 as a normal user.
benoitc authored
98
99 On most UNIX systems binding port 80 is a privileged operation (requires
100 root). Running Erlang as root is not recommended so some configuration
101 will need to be done so that rcouch can bind port 80.
102
103 If you run a recent Linux kernel with capabilities you can give Erlang
104 the privilege using the setcap command (you may need to install a
105 package named lxc or similar to obtain this command).
106
107 $ setcap 'cap_net_bind_service=+ep' /path/to/rel/refuge/erts-5.8.5/bin/beam`
108 $ setcap 'cap_net_bind_service=+ep' /path/to/rel/refuge/erts-5.8.5/bin/beam.smp
109
110 On FreeBSD all ports can be made accessible to all users by issuing:
111
112 $ sysctl net.inet.ip.portrange.reservedhigh=0
Something went wrong with that request. Please try again.