Difference between revisions of "Couchdb"

From ArchWiki
Jump to: navigation, search
m (Using Futon)
(Configuring)
Line 22: Line 22:
 
Change the default port, bind address, log-level and other useful nuggets in ''/etc/couchdb/local.ini''
 
Change the default port, bind address, log-level and other useful nuggets in ''/etc/couchdb/local.ini''
  
'''Note:''' Do not modify ''/etc/couchdb/default.ini'' as it gets overwritten whenever couchdb is updated
+
'''Note:''' Do not modify ''/etc/couchdb/default.ini'' as it gets overwritten whenever couchdb is updated. Also be sure to restart couchdb after changes to this file.
 +
 
 +
If you'd like to use ssl with a self-signed certificate you can create one like this:
 +
 
 +
  # cd /etc/couchdb
 +
  # openssl genrsa -des3 -out server.key 1024
 +
  # openssl req -new -key server.key -out server.csr
 +
  # cp server.key server.key.org
 +
  # openssl rsa -in server.key.org -out server.key
 +
  # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
 +
 
 +
Then uncomment httpsd and update the path in the '''[ssl]''' section
 +
 
 +
  [daemons]
 +
  httpsd = {couch_httpd, start_link, [https]}
 +
 
 +
  [ssl]
 +
  cert_file = /etc/couchdb/server.crt
 +
  key_file = /etc/couchdb/server.key
 +
 
 +
Futon can be accessed over ssl on port 6984 via https://localhost:6984/_utils/
  
 
== More Resources ==
 
== More Resources ==

Revision as of 01:38, 9 July 2011

Installation

Install the Couchdb package:

# pacman -S couchdb

Running

Start Couch

# rc.d start couchdb

To launch on startup add to it to your daemons array in /etc/rc.conf

DAEMONS=(syslog-ng network netfs crond sshd httpd couchdb)

Using Futon

You can now access the Futon admin interface by going to http://localhost:5984/_utils

Configuring

Change the default port, bind address, log-level and other useful nuggets in /etc/couchdb/local.ini

Note: Do not modify /etc/couchdb/default.ini as it gets overwritten whenever couchdb is updated. Also be sure to restart couchdb after changes to this file.

If you'd like to use ssl with a self-signed certificate you can create one like this:

 # cd /etc/couchdb
 # openssl genrsa -des3 -out server.key 1024
 # openssl req -new -key server.key -out server.csr
 # cp server.key server.key.org
 # openssl rsa -in server.key.org -out server.key
 # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Then uncomment httpsd and update the path in the [ssl] section

 [daemons]
 httpsd = {couch_httpd, start_link, [https]}
 [ssl]
 cert_file = /etc/couchdb/server.crt
 key_file = /etc/couchdb/server.key

Futon can be accessed over ssl on port 6984 via https://localhost:6984/_utils/

More Resources