How to install Couchbase Server on Ubuntu 18.04 Bionic Beaver Linux

Objective

The objective is to install Couchbase Enterprise or Community Server on Ubuntu 18.04 Bionic Beaver Linux

Operating System and Software Versions

  • Operating System: – Ubuntu 18.04 Bionic Beaver
  • Software: – Couchbase Server 5.0.1 Enterprise or Community Edition or higher

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Instructions

Download Couchbase Server

First, step is to download Couchbase Server Community Edition. Navigate to download page and download Couchbase Server debian package. If the Ubuntu 18.04 version is still not available the 16.04 version will do just well. Save the downloaded DEB file into your home directory eg.:

$ ls couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb 
couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb

Alternatively use wget to download Couchbase server package. Please update version number where appropriate:

COUCHBASE SERVER COMMUNITY EDITION:
$ wget https://packages.couchbase.com/releases/5.0.1/couchbase-server-community_5.0.1-ubuntu16.04_amd64.deb
COUCHBASE SERVER ENTERPRISE EDITION:
$ wget https://packages.couchbase.com/releases/5.0.1/couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb


Install Couchbase Server

We will be using gdebi command to install Couchbase Server on Ubuntu 18.04. gdebi will automatically download and install any prerequisites. If gdebi command is not available on your system you can install it by:

$ sudo apt install gdebi-core

Once ready, install the previously downloaded Couchbase Server DEB package. When prompted, hit y to proceed with the installation:

$ sudo gdebi couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
Requires the installation of the following packages: libpython-stdlib python python-httplib2 python-minimal python2.7 python2.7-minimal 

Couchbase Server
 Couchbase is the company behind the Couchbase open source project, a
 vibrant community of developers and users of Couchbase
 document-oriented database technology. Our flagship product, Couchbase
 Server, is a packaged version of Couchbase technology that's available
 in Community and Enterprise Editions. We're known for our easy
 scalability, consistent high performance, 24x365 availability, and a
 flexible data model. Read more about Couchbase Server here -
 http://www.couchbase.com/nosql-databases/couchbase-server
Do you want to install the software package? [y/N]:y

After installation your Couchbase server should be up and running:

$ service couchbase-server status
● couchbase-server.service - Couchbase Server
   Loaded: loaded (/lib/systemd/system/couchbase-server.service; enabled; vendor preset: enabled)
   Active: active (running); 9min ago
     Docs: http://docs.couchbase.com
 Main PID: 15686 (beam.smp)
    Tasks: 153 (limit: 4915)

Firewall Rules of Couchbase Server

If you have firewall disabled on your Ubuntu 18.04 server simply navigate your browser to http://SERVER-IP-OR-HOSTNAME:8091 to start configuration. Otherwise use the below command to allow incoming TCP ports on UFW firewall as required by Couchbase Server:

$ sudo ufw allow from any to any port 369,8091:8094,9100:9105,9998,9999,11209:11211,11214,11215,18091:18093,21100:21299 proto tcp

install Couchbase Server on Ubuntu 18.04 Bionic