Getting started with Amazon EC2

If you have a credit card and can swing ten cents per hour, here is a method to conveniently try the latest CouchDB code without having to install local software. This procedure will have you quickly running an Ubuntu 8.10 server and building what you need from the source code.

  1. Set up your Amazon AWS EC2 account, firewall ruleset, etc. (For example, see [WWW] this article, steps 1 through 2.6.)

  2. Start the Ubuntu 8.10 server image, ami-5059be39

  3. When it is up, copy the public DNS name and run: ssh -l ubuntu <public dns name>

  4. Once logged in, install the prerequisites:

    1. sudo apt-get update && sudo apt-get -y upgrade

    2. sudo apt-get install erlang libmozjs-dev libicu-dev libcurl4-gnutls-dev make subversion automake autoconf libtool help2man

  5. Fetch, build, and run CouchDB:

    1. svn checkout couchdb # (Instead of trunk, you could try  tags/0.8.0 ,  tags/0.8.1 , etc.)

    2. cd couchdb

    3. ./bootstrap && ./configure && make && sudo make install

    4. sudo adduser --system --home /usr/local/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos 'CouchDB account' couchdb

    5. sudo chown -R couchdb.couchdb /usr/local/var/{lib,log}/couchdb

    6. (Optional) Enable direct web access. NOTE: This step makes your CouchDB instance available for everyone. See [WWW] the FaQ for some (but not all) security options.

      1. sudo vim /usr/local/etc/couchdb/local.ini 

      2. Search for "bind_address", uncomment it, and change it to

      3. Save and exit

    7. (Alternative option) Set up port forwarding to access your DB, for example with SSH.

      1. ssh -L 5984:localhost:5984 -l ubuntu <public DNS name>

      2. Leave that session open as long as you need the proxy to work

      3. Your new DB URL will be [WWW] instead.

    8. sudo -i -u couchdb couchdb 

  6. Test it by going to http://<public dns name>:5984/_utils/

You can also of course install and try out client libraries. For example, with [WWW] CouchRest:

  1. sudo apt-get install libxml2-dev libxslt-dev rubygems ruby1.8-dev irb

  2. sudo gem install couchrest archive-tar-minitar nokogiri rcov hoe

  3. Try it!

last edited 2009-07-03 20:48:58 by CurtArnold