3.1. Single Node Setup

Many users simply need a single-node CouchDB 2.x installation. Operationally,it is roughly equivalent to the CouchDB 1.x series. Note that a single-nodesetup obviously doesn’t take any advantage of the new scaling andfault-tolerance features in CouchDB 2.x.

After installation and initial startup, visit Fauxton athttp://127.0.0.1:5984/_utils#setup. You will be asked to set upCouchDB as a single-node instance or set up a cluster. When you click“Single-Node-Setup”, you will get asked for an admin username andpassword. Choose them well and remember them.

You can also bind CouchDB to a public address, so it is accessible within yourLAN or the public, if you are doing this on a public VM. Or, you can keep theinstallation private by binding only to 127.0.0.1 (localhost). Binding to0.0.0.0 will bind to all addresses. The wizard then configures your adminusername and password and creates the three system databases _users,_replicator and _global_changes for you.

Alternatively, if you don’t want to use the Setup Wizard, and run 2.x as asingle node with a server administrator already configured viaconfig file, make sure tocreate the three system databases manually on startup:

  1. curl -X PUT http://127.0.0.1:5984/_users
  2.  
  3. curl -X PUT http://127.0.0.1:5984/_replicator
  4.  
  5. curl -X PUT http://127.0.0.1:5984/_global_changes

Note that the last of these is not necessary if you do not expect to beusing the global changes feed. Feel free to delete this database if youhave created it, it has grown in size, and you do not need the function(and do not wish to waste system resources on compacting it regularly.)

原文: http://docs.couchdb.org/en/stable/setup/single-node.html