Difference between revisions of "Couchdb"

From ArchWiki
Jump to: navigation, search
(Added instructions for creating admin accounts)
(add introductory text and misc formatting)
Line 1: Line 1:
 
[[Category:Database management systems (English)]]
 
[[Category:Database management systems (English)]]
 +
''"Apache CouchDB is a document-oriented database that can be queried and indexed in a MapReduce fashion using JavaScript."'' - [http://couchdb.apache.org/ CouchDB homepage]
 +
 
== Installation ==
 
== Installation ==
  
Install the Couchdb package:
+
Install the {{Package Official|couchdb}} package:
 
  # pacman -S couchdb
 
  # pacman -S couchdb
  
Line 10: Line 12:
 
  # rc.d start couchdb
 
  # rc.d start couchdb
  
To launch on startup add it to your daemons array in /etc/rc.conf
+
To launch on startup add it to your DAEMONS array in [[rc.conf]]:
  
  DAEMONS=(syslog-ng network netfs crond sshd httpd couchdb)
+
  DAEMONS=(syslog-ng network netfs crond sshd httpd '''couchdb''')
  
 
== Using Futon ==
 
== Using Futon ==
Line 20: Line 22:
 
== Configuring ==
 
== Configuring ==
  
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 {{filename|/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.
+
'''Note:''' Do not modify {{filename|/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:
+
If you would like to use ssl with a self-signed certificate you can create one like this:
  
 
   # cd /etc/couchdb
 
   # cd /etc/couchdb
Line 44: Line 46:
 
Futon can be accessed over ssl on port 6984 via https://localhost:6984/_utils/
 
Futon can be accessed over ssl on port 6984 via https://localhost:6984/_utils/
  
Admin users can be created in your local.ini file. Add the username and password in plaintext, next time couch is restarted it will hash the password. See [http://lizconlan.github.com/sandbox/securing-couchdb.html create a read-only database] for locking down databases and further security.
+
Admin users can be created in your {{filename|local.ini}} file. Add the username and password in plaintext, next time couch is restarted it will hash the password. See [http://lizconlan.github.com/sandbox/securing-couchdb.html create a read-only database] for locking down databases and further security.
 
    
 
    
 
   [admins]
 
   [admins]
Line 50: Line 52:
  
 
== More Resources ==
 
== More Resources ==
* http://wiki.apache.org/couchdb/FrontPage
+
 
 +
* [http://couchdb.apache.org/ Official CouchDB page]
 +
* [http://wiki.apache.org/couchdb/FrontPage CouchDB Wiki]
 
* [http://guide.couchdb.org/ CouchDB - The Definitive Guide]
 
* [http://guide.couchdb.org/ CouchDB - The Definitive Guide]
* http://couchdb.apache.org/
 
 
* [http://lizconlan.github.com/sandbox/securing-couchdb.html create a read-only database]
 
* [http://lizconlan.github.com/sandbox/securing-couchdb.html create a read-only database]

Revision as of 21:49, 30 July 2011

"Apache CouchDB is a document-oriented database that can be queried and indexed in a MapReduce fashion using JavaScript." - CouchDB homepage

Installation

Install the Template:Package Official package:

# pacman -S couchdb

Running

Start Couch

# rc.d start couchdb

To launch on startup add it to your DAEMONS array in 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 Template:Filename

Note: Do not modify Template:Filename as it gets overwritten whenever couchdb is updated. Also be sure to restart couchdb after changes to this file.

If you would 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/

Admin users can be created in your Template:Filename file. Add the username and password in plaintext, next time couch is restarted it will hash the password. See create a read-only database for locking down databases and further security.

 [admins]
 admin = magicalunicorns

More Resources