You are viewing the documentation for a prerelease version.

View Latest

Install Couchbase Server on Amazon Linux 2

Couchbase Server can be installed on Amazon Linux 2 for production and development use-cases. Root and non-root installations are supported.

Amazon Linux 2 is supported with Couchbase Server 6.0.1+. See Supported Operating Systems for details.

Use the instructions on this page to install Couchbase Server on Amazon Linux 2 using Couchbase-provided RPM packages. The instructions support both Enterprise and Community editions.

If you’re upgrading an existing installation of Couchbase Server, refer to Upgrading Couchbase Server.

Before You Install

Couchbase Server works out-of-the-box with most OS configurations. However, the procedures on this page assume the following:

For production deployments, make sure to follow the deployment guidelines so that your systems and environment are properly sized and configured before installation.

Basic Installation

You must be logged in as root (superuser) or use sudo to run the installation commands.

Install Using RPM Package

Install Couchbase Server on Amazon Linux 2 using a full RPM package provided by Couchbase.

  1. Download the appropriate package from the Couchbase downloads page.

  2. Install Couchbase Server.

    sudo rpm --install package-name.rpm

    Once installation is complete, Couchbase Server will start automatically (and will continue to start automatically at run levels 2, 3, 4, and 5, and explicitly shut down at run levels 0, 1, and 6). You can use the systemctl command (service on older operating systems) to start and stop the Couchbase Server service, as well as check the current status. Refer to Couchbase Server Startup and Shutdown for more information.

  3. Open a web browser and access the Couchbase Web Console to verify that the installation was successful and the node is available.

Installing as non-root, non-sudo

A non-sudo, non-root installation still runs Couchbase Server and all Couchbase command-line tools.

  1. Place the Couchbase Server RPM into a directory where Couchbase Server is to be installed.

  2. Go to that directory and extract the RPM:

    cd /home/me/couchbase-non-root/
    rpm2cpio couchbase-server-enterprise-version-amzn2.x86_64.rpm | cpio --extract --make-directories --no-absolute-filenames

    In the directory where the files were extracted, the opt and etc sub-directories are now available.

  3. After you extract the Couchbase Server installation files, go to the sub-directory:

    cd opt/couchbase
  4. Run the following script to complete the non-root Couchbase Server installation:

    ./bin/install/reloc.sh `pwd`

    This enables you to continue the installation as a non-root, non-sudo user.

  5. To run the server, use

    ./bin/couchbase-server \-- -noinput -detached
  6. To stop the server, use

    ./bin/couchbase-server -k

Next Steps

Following installation and start-up of Couchbase Server, a node must be initialized and provisioned.

  • If it is the first node in a deployment, initialization and provisioning happens all at once when you create a cluster of one.

    Refer to Create a Cluster

  • If you already have an existing cluster, the node is initialized and provisioned when you add it to the cluster.

  • Optionally, initialization can be performed explicitly and independently of provisioning, as a prior process, in order to establish certain configurations, such as custom disk-paths.