125df42aaSSteve Yen# The Couchbase Server
2721e3ba0SDustin Sallings
3721e3ba0SDustin SallingsThis application represents the top of the hierarchy of all memcached
4b3b40404SSteve Yensmart services.  It is an application in the Erlang OTP sense.
5721e3ba0SDustin Sallings
631b21ce5SSteve Yen## Building
731b21ce5SSteve Yen
81eba5e55Sdave-finlayBuild dependencies include:
931b21ce5SSteve Yen
101eba5e55Sdave-finlay* erlang R16B03
1131b21ce5SSteve Yen
121eba5e55Sdave-finlayBuilding:
1331b21ce5SSteve Yen
149c8e5c07SAliaksey KandratsenkaYou should use top level make file and repo manifest as explained
159c8e5c07SAliaksey Kandratsenkahere: https://github.com/membase/manifest/blob/master/README.markdown
1631b21ce5SSteve Yen
17b3336b29SAliaksey Kandratsenka## Runtime dependencies
18721e3ba0SDustin Sallings
19546bebe2SEric LambertBefore you start the server, you may need to do the following
20546bebe2SEric Lambert  * Make sure the needed ports are not being used (these include
21dee59555SSteve Yen    8091, 11211, 11212, etc).
22b3336b29SAliaksey Kandratsenka
23b3336b29SAliaksey Kandratsenka
24b3336b29SAliaksey Kandratsenka## Running
25546bebe2SEric Lambert
269c8e5c07SAliaksey KandratsenkaAfter building everything via top level makefile you'll have
271eba5e55Sdave-finlay`couchbase-server` script in your `$REPO/install/bin` (or other prefix if
289c8e5c07SAliaksey Kandratsenkayou specified so). You can run this script for normal single node
299c8e5c07SAliaksey Kandratsenkastartup.
30721e3ba0SDustin Sallings
319c8e5c07SAliaksey KandratsenkaDuring development it's convenient to have several 'nodes' on your
321eba5e55Sdave-finlaymachine. There's `./cluster_run` script in root directory for achieving
331eba5e55Sdave-finlaythat. Feel free to ask `--help`. You normally need something like -n2
349c8e5c07SAliaksey Kandratsenkawhere 2 is number of nodes you want.
35721e3ba0SDustin Sallings
369c8e5c07SAliaksey KandratsenkaIt'll start REST API on ports 9000...9000+n. memcached on ports
37660b3e39SAliaksey Kandratsenka12000+2*i and 11999-i and moxi ports on 12001+2*i ports. CAPI (which
38660b3e39SAliaksey Kandratsenkawas originally expected to be couch-compatible http API
39660b3e39SAliaksey Kandratsenkaimplementation) is 9500...9500+n
4005f8bacbSSteve Yen
419c8e5c07SAliaksey KandratsenkaNote that blank nodes are not configured and need to be setup. I
429c8e5c07SAliaksey Kandratsenkasuggest trying web UI first to get the feeling of what's
439c8e5c07SAliaksey Kandratsenkapossible. Just visit REST API port(s) via browser. For development
449c8e5c07SAliaksey Kandratsenkamode clusters it's port 9000 and higher. For production mode it's port
459c8e5c07SAliaksey Kandratsenka8091.
46c7b2cee8SSteve Yen
479c8e5c07SAliaksey KandratsenkaOther alternative is setting up and clustering nodes via REST
4825df42aaSSteve YenAPI. couchbase-cli allows that. And you can easily write your own
499c8e5c07SAliaksey Kandratsenkascript(s).
50c7b2cee8SSteve Yen
511eba5e55Sdave-finlayThere's `./cluster_connect` script that eases cluster configuration for
521eba5e55Sdave-finlaydevelopment clusters. Again, ask `--help`.
53c7b2cee8SSteve Yen
549c8e5c07SAliaksey KandratsenkaSometimes during debugging/development you want smaller number of
559c8e5c07SAliaksey Kandratsenkavbuckets. You can change vbuckets number by setting
561eba5e55Sdave-finlay`COUCHBASE_NUM_VBUCKETS` environment variable to desired number of vbuckets
5725df42aaSSteve Yenbefore creating new couchbase bucket.
58916c9a84SMatt Ingenthron
599c8e5c07SAliaksey Kandratsenka### Other tools
601dc3ba38SSteve Yen
6125df42aaSSteve YenCouchbase ships with a bunch of nice tools. Feel free to check
621eba5e55Sdave-finlay`$REPO/install/bin` (or `$PREFIX/bin`). One of notable tools is
631eba5e55Sdave-finlay`mbstats`. It allows you to query buckets for all kinds of internal
649c8e5c07SAliaksey Kandratsenkastats.
651dc3ba38SSteve Yen
661eba5e55Sdave-finlayAnother notable tool is `couchbase-cli`.
672e92488fSSteve Yen
68a49df8d8SDustin Sallings* * * * *
691eba5e55Sdave-finlayCopyright (c) 2016, Couchbase, Inc.
70