Skip to content
Branch: master
Find file History
Type Name Latest commit message Commit time
Failed to load latest commit information. Fix typo in swappiness setting Jan 10, 2019
disable-thp Allow installation on ubuntu 18.04 Jul 11, 2019
install-couchbase-server Explicitly check for 404 before trying fallback url Jul 22, 2019

Couchbase Server Install Script

This folder contains a script for installing Couchbase server and its dependencies. Use this script to create a Couchbase Amazon Machine Image (AMI) that can be deployed in AWS across an Auto Scaling Group using the couchbase-cluster module.

This script has been tested on the following operating systems:

  • Ubuntu 16.04
  • Amazon Linux 2

There is a good chance it will work on other flavors of Debian, CentOS, and RHEL as well.

Quick start

This module depends on bash-commons, so you must install that project first as documented in its README.

To install Couchbase, use git to clone this repository at a specific tag (see the releases page for all available tags) and run the install-couchbase-server script:

git clone --branch <VERSION>

The install-couchbase-server script will install Couchbase, its dependencies, and the run-couchbase-server script. You can execute the run-couchbase-server script when the server is booting to start Couchbase and configure it to automatically join other nodes to form a cluster.

We recommend running the install-couchbase-server script as part of a Packer template to create a Couchbase Amazon Machine Image (AMI) (see the couchbase-ami example for fully-working sample code). You can then deploy the AMI across an Auto Scaling Group using the couchbase-cluster module (see the examples folder for fully-working sample code).

Command line Arguments

Run install-couchbase-server --help to see all available arguments.

Usage: install-couchbase-server [options]

This script can be used to install Couchbase Server and its dependencies. This script has been tested with Ubuntu 16.04 and Amazon Linux 2.


  --edition		The edition of Couchbase to install. Must be one of: enterprise, community. Default: enterprise.
  --version		The version of Couchbase to install. Default: 5.1.0.
  --checksum		The checksum of the Couchbase package. Required if --version is specified. You can get it from the downloads page of the Couchbase website.
  --checksum-type	The type of checksum in --checksum. Required if --version is specified. Must be one of: sha256, md5.
  --swappiness		The OS swappiness setting to use. Couchbase recommends setting this to 0. Default: 0.


  install-couchbase-server --edition enterprise

How it works

The install-couchbase-server script does the following:

  1. Install Couchbase binaries and scripts
  2. Update swap settings
  3. Disable transparent huge pages

Install Couchbase binaries and scripts

Install the following:

Update swap settings

Set the "swappiness" setting on your OS to 0. See Swap Space and Kernel Swappiness for details.

Disable transparent huge pages

Disable transparent huge pages on your OS. See Disabling Transparent Huge Pages (THP) for details.

Why use Git to install this code?

We needed an easy way to install these scripts that satisfied a number of requirements, including working on a variety of operating systems and supported versioning. Our current solution is to use git, but this may change in the future. See Package Managers for a full discussion of the requirements, trade-offs, and why we picked git.

You can’t perform that action at this time.