Install Couchbase Server on Red Hat Enterprise and CentOS

    +
    Couchbase Server can be installed on Red Hat Enterprise Linux and CentOS Linux for production and development use-cases. Root and non-root installations are supported.

    Use the instructions on this page to install Couchbase Server on Red Hat Enterprise Linux and CentOS platforms 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 Yum

    The Red Hat package manager (yum) provides the simplest and most comprehensive way to install Couchbase Server on Red Hat Enterprise and CentOS platforms. This method involves downloading and installing a small meta package from Couchbase, which yum can then use to automatically download and install Couchbase Server and all of its dependencies.

    1. Download the meta package.

      curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-x86_64.rpm
    2. Install the meta package.

      sudo rpm -i ./couchbase-release-1.0-x86_64.rpm

      The meta package installs the necessary information for yum to be able to retrieve all of the necessary Couchbase Server installation packages and dependencies.

    3. Install Couchbase Server.

      • Enterprise

      • Community

      To install the latest release
      sudo yum install couchbase-server

      You’ll be prompted to start the download of Couchbase Server (plus any dependencies), as well as import several GPG keys. For each of these prompts, type y to accept and continue.

      To install a specific release
      1. List the available releases.

        yum list --showduplicates couchbase-server

        Available releases are listed with their full version-build number:

        couchbase-server.x86_64   6.0.0-1693
      2. Specify a release to install it.

        sudo yum install couchbase-server-version-build

        Using the example listing from the previous step, the resulting installation command would be:

        sudo yum install couchbase-server-6.0.0-1693

        You’ll be prompted to start the download of Couchbase Server (plus any dependencies), as well as import several GPG keys. For each of these prompts, type y to accept and continue.

      To install the latest release
      sudo yum install couchbase-server-community

      You’ll be prompted to start the download of Couchbase Server (plus any dependencies), as well as import several GPG keys. For each of these prompts, type y to accept and continue.

      To install a specific release
      1. List the available releases.

        yum list --showduplicates couchbase-server-community

        Available releases are listed with their full version-build number:

        couchbase-server-community.x86_64   6.0.0-1693
      2. Specify a release to install it.

        sudo yum install couchbase-server-community-version-build

        Using the example listing from the previous step, the resulting installation command would be:

        sudo yum install couchbase-server-community-6.0.0-1693

        You’ll be prompted to start the download of Couchbase Server (plus any dependencies), as well as import several GPG keys. For each of these prompts, type y to accept and continue.

      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.

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

    Install Using RPM Package

    Install Couchbase Server on Red Hat Enterprise and CentOS using a full RPM package provided by Couchbase.

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

    2. Install Couchbase Server.

      sudo yum install ./package-name.rpm

      If any Couchbase Server dependencies are missing on your system, yum will automatically download and install them as part of the installation process.

      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

    Couchbase Server can be installed on Red Hat Enterprise and CentOS without use of sudo or root.

    Before proceeding, ensure that Python 2 is installed on the current node, and that the current node has all Couchbase-Server dependencies installed, as follows.

    Verify that Python 2 is Installed

    To verify the presence of Python 2, enter the following command:

    python -V

    If python is installed, the version number is displayed:

    Python 2.7.16

    Provided that the leftmost number in the displayed version-number is 2, non-root installation can be performed.

    Check Couchbase-Server Dependencies

    To ensure that the current node has all Couchbase-Server dependencies installed, enter the following command, in order to list the dependencies:

    rpm -qp <couchbase-server-rpm>.rpm --requires

    Ensure that all listed dependencies have been installed. Then, proceed as follows.

    Perform Non-Sudo/Non-Root Installation

    1. Download the Couchbase Server RPM, using wget or curl.

    2. Download the cb-non-package-installer script; using wget or curl. For example:

      wget https://packages.couchbase.com/cb-non-package-installer/cb-non-package-installer
    3. Run the cb-non-package-installer script, to install Couchbase Server. The following example assumes that the RPM is located in the current working directory, and that the intended install-location is a directory named couchbase-home, which is in the current working directory.

      cb-non-package-installer --install --install-location couchbase-home \
      --package couchbase-server-enterprise-6.5.0-3290-centos7.x86_64.rpm

    When installation is complete, the following notification is displayed:

    Successfully installed

    Couchbase Server can now be started and stopped, and its status can be checked, by means of commands located in the /opt/couchbase/bin directory, located under the specified install-location (which in this case, is couchbase-home). Therefore, assuming that the current working directory is ./couchbase-home/opt/couchbase/bin:

    • To run the server, use:

      ./couchbase-server \-- -noinput -detached
    • To determine whether the server is running, use:

      ./couchbase-server --status

      This displays either the notification Couchbase Server is running; or the notification Couchbase Server is not running.

    • To stop the server, use:

      ./couchbase-server -k

    Upgrading as Non-Root/Non-Sudo

    To perform a non-root/non-sudo upgrade of Couchbase Server on Red Hat Enterprise or CentOS, proceed as follows:

    1. Ensure that Python 2 is installed on the current node.

    2. Download the Couchbase Server RPM, using wget or curl.

    3. If necessary, download the cb-non-package-installer script, using wget or curl.

    4. Ensure that the previous version of Couchbase Server was configured, as well as installed (since the upgrade process will now make use of the directory structure that the previous configuration provided).

    5. Shut down Couchbase Server, using the instruction provided above, in Installing as Non-Root/Non-Sudo.

    6. Run the cb-non-package-installer script, to upgrade Couchbase Server.

      cb-non-package-installer --upgrade --install-location couchbase-home \
      --package couchbase-server-enterprise-6.5.0-centos7.x86_64.rpm

      During the upgrade, the following notification may be displayed:

      Running cbupgrade this could take some time

      When upgrade has completed, the following notification is displayed:

      Upgrade has completed successfully

    Setting Max Process Limits

    On Red Hat Enterprise and CentOS, it’s recommended that you increase the maximum process limits for Couchbase.

    To set the process limits, create a .conf file in the /etc/security/limits.d directory (such as 91-couchbase.conf), and add the following values:

    couchbase soft nproc 4096
    couchbase hard nproc 16384

    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.