-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstallation.html
102 lines (95 loc) · 5 KB
/
installation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<h2>CouchDB Setup</h2>
<dl id="installation" class="dl-horizontal">
<dt data-toggle="collapse" data-target="#simple" data-parent="#installation"><strong>Simple</strong> - for behind firewalls and proxies</dt>
<dd id="simple" class="collapse">
<ol class="help">
<li>Install <a href="http://couchdb.apache.org/#download">Couch DB 1.2</a></li>
<li>Go to Futon (<a href="http://127.0.0.1/_utils/">http://127.0.0.1/_utils/</a>)</li>
<li>Add an admin user to Couch</li>
<li>
Go into the <code>_replicator</code> database and create task to copy
Fubar from an existing installation:
<pre>{
source : http://username:password@your-source.com.au/sourceapp,
target : errorlog,
filter : errorlog/design
}</pre></pre>
<span class="label label-info">note</span> the same settings can be used to update an existing app.
</li>
<li>
Fubar should now be available on
<a href="http://127.0.0.1/errorlog/_design/errorlog/index.html">http://127.0.0.1/errorlog/_design/errorlog/index.html</a>.<br>
You will need to log in as the admin to set up replication from Fubar.
</li>
<li>Set up Fubar to log to <code>errorlog</code>, no username or password required.</li>
</ol>
</dd>
<dt data-toggle="collapse" data-target="#secure" data-parent="#installation"><strong>Secure</strong> - for public facing databases</dt>
<dd class="collapse">
<ol id="secure" class="help">
<li>Install <a href="http://couchdb.apache.org/#download">Couch DB 1.2</a></li>
<li>Go to Futon (<a href="http://127.0.0.1/_utils/">http://127.0.0.1/_utils/</a>)</li>
<li>Add an admin user to Couch</li>
<li>Create the <code>errorlog</code> and <code>errorapp</code> databases</li>
<li>
Edit <code>errorlog</code> and click "Security" - add your user to
the list of admins AND users. You can also add less powerful users just to the users list.
</li>
<li>
Go into the <code>_replicator</code> database and create task to copy
Fubar from an existing installation:
<pre>{
source : http://username:password@your-source.com.au/sourceapp,
target : errorapp,
filter : errorlog/design
}</pre>
<span class="label label-info">note</span> the same settings can be used to update an existing app.
</li>
<li>Edit "errorapp" and click "Security" - add your admin user to the list of admins.</li>
<li>
<code>errorlog</code> should now be available on <a href="http://127.0.0.1/errorapp/_design/errorlog/index.html">http://127.0.0.1/<strong>errorapp</strong>/_design/errorlog/index.html</a>.
Notice that the url refers to <code>errorapp</code> and not
<code>errorlog</code>. <code>errorapp</code> allows all users to access the application,
but security on <code">errorlog</code> requires logging in before
a user can access it's data. Users in the user list can view reports, users in the admin list can
configure the server.<br>
You will need to log in as the admin to set up replication from Fubar.
</li>
<li>Log into Fubar as the admin user.</li>
<li>Go to the Configuration page and update the Log Database to <code>errorlog</code>.</li>
<li>
Set up Fubar to log to <code>errorlog</code>, using the credentials for any user in the
users list.
</li>
</ol>
<dt data-toggle="collapse" data-target="#extracredit" data-parent="#installation"><strong>Extra Credit</strong></dt>
<dd class="collapse">
<dl id="extracredit">
<dt>Increasing login session length</dt>
<dd>Got to Futon Configuration section (<a href="http://127.0.0.1/_utils/config.html">http://127.0.0.1/_utils/config.html</a>)</dd>
<dd>Edit the <strong>couch_httpd_auth timeout</strong> value.</dd>
<dt>Database Compaction</dt>
<dd>The normal running of Couch can cause a lot of redundant data to build up - particularly after adding new documents.</dd>
<dd>Got to Futon Configuration section (<a href="http://127.0.0.1/_utils/config.html">http://127.0.0.1/_utils/config.html</a>)</dd>
<dd>Scroll to the bottom of the page and click "Add a new section".</dd>
<dd><strong>section</strong>: compactions, <strong>option</strong>:_default, <strong>value</strong>: [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]</dd>
<dd>For more information about compaction options: <a href="http://wiki.apache.org/couchdb/Compaction/">Compaction</a></dd>
<dt>Apache Proxy</dt>
<dd>The following can be set up to proxy Couch DB requests through an Apache Virtual:
<pre>
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule deflate_module modules/mod_deflate.so
ProxyRequests off
<Location />
ProxyPass http://localhost:5984/
ProxyPassReverse /
</Location>
</pre>
</dd>
<dd>This also makes it easy to add IP restrictions.</dd>
<dd><span class="label label-info">note</span> that you can also add rewrite rules, but be careful that they don't interfere with the paths Couch expects.</dd>
</dl>
</dd>
</div>