{"id":1605,"date":"2022-03-26T16:02:20","date_gmt":"2022-03-26T13:02:20","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1605"},"modified":"2024-03-09T10:56:53","modified_gmt":"2024-03-09T07:56:53","slug":"install-couchbase-server-on-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-couchbase-server-on-ubuntu\/","title":{"rendered":"Install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04"},"content":{"rendered":"\n<p>In this tutorial, you will learn how to install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04. According to the <a href=\"https:\/\/docs.couchbase.com\/home\/server.html\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>, <em>Couchbase Server is an open source, distributed, JSON document database. It exposes a scale-out, key-value store with managed cache for sub-millisecond data operations, purpose-built indexers for efficient queries, and a powerful query engine for executing SQL-like queries<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04<\/h2>\n\n\n\n<p>Couchbase is available in different <a href=\"https:\/\/www.couchbase.com\/products\/editions\" target=\"_blank\" rel=\"noreferrer noopener\">editions<\/a>; Enterprise, Community and Couchbase Capella.<\/p>\n\n\n\n<p>This guide is about how to install the community edition couch base server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">System Requirements<\/h3>\n\n\n\n<p>Before you can proceed to install Couchbase Server on Ubuntu, there are some few requirements needed;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>check the <a href=\"https:\/\/docs.couchbase.com\/server\/current\/install\/pre-install.html\" target=\"_blank\" rel=\"noreferrer noopener\">minimum system resource requirements<\/a>.<\/li>\n\n\n\n<li>Disable Transparent hugepages. This can easily be done by creating a system service.<\/li>\n<\/ul>\n\n\n\n<pre class=\"scroll-box\"><code>\ncat > \/etc\/systemd\/system\/disable_thp.service << 'EOL'\n[Unit]\nDescription=Disable Kernel Support for Transparent Huge Pages (THP)\n\n[Service]\nType=simple\nExecStart=\/bin\/sh -c \"echo 'never' > \/sys\/kernel\/mm\/transparent_hugepage\/enabled && echo 'never' > \/sys\/kernel\/mm\/transparent_hugepage\/defrag\"\n\n[Install]\nWantedBy=multi-user.target\nEOL\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now disable_thp<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disable Swapiness<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'vm.swappiness=0' &gt; \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sysctl -p<\/code><\/pre>\n\n\n\n<p>There are two ways in which you can install Couchbase server;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#using-apt\">Install using APT via Couchbase repositories<\/a><\/li>\n\n\n\n<li><a href=\"#using-deb\">Install using DEB Binary Package<\/a><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-apt\">Install Couchbase Server on Ubuntu using APT via Couchbase repositories<\/h3>\n\n\n\n<p>On Ubuntu 20.04;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To install Install Couchbase Server on Ubuntu via APT, you first need to install Couchbase repositories;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/packages.couchbase.com\/releases\/couchbase-release\/couchbase-release-1.0-amd64.deb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install .\/couchbase-release-1.0-amd64.deb<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next, run system package cache update;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Couchbase server on Ubuntu 20.04<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install couchbase-server-community<\/code><\/pre>\n\n\n\n<p>On Ubuntu 22.04;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Currently, Ubuntu 22.04 is not supported, as of this writing. Thus, we will use Ubuntu 20.04 Repos instead!<\/li>\n\n\n\n<li>Therefore, install Ubuntu 20.04 Couchbase repos on Ubuntu 22.04;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'deb &#91; arch=amd64 ] http:\/\/packages.couchbase.com\/releases\/couchbase-server\/community\/deb\/ focal focal\/main' \\\n&gt; \/etc\/apt\/sources.list.d\/couchbase.list<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install repository signing key;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO- http:\/\/packages.couchbase.com\/ubuntu\/couchbase.key | gpg --dearmor &gt; \/etc\/apt\/trusted.gpg.d\/couchbase.gpg<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run system update;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Couchbase on Ubuntu 22.04<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install couchbase-server-community<\/code><\/pre>\n\n\n\n<p>Sample installation output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Preparing to unpack ...\/couchbase-server-community_7.0.2-ubuntu20.04_amd64.deb ...\nMinimum RAM required  : 4 GB\nSystem RAM configured : 1.94 GB\n\nMinimum number of processors required : 4 cores\nNumber of processors on the system    : 2 cores\nUnpacking couchbase-server-community (7.0.2-6703-1) ...\nSetting up couchbase-server-community (7.0.2-6703-1) ...\n\nYou have successfully installed Couchbase Server.\nPlease browse to http:\/\/couchbase.kifarunix-demo.com:8091\/ to configure your server.\nRefer to https:\/\/docs.couchbase.com for additional resources.\n\nPlease note that you have to update your firewall configuration to\nallow external connections to a number of network ports for full\noperation. Refer to the documentation for the current list:\nhttps:\/\/docs.couchbase.com\/server\/7.0\/install\/install-ports.html\n\nBy using this software you agree to the End User License Agreement.\nSee \/opt\/couchbase\/LICENSE.txt.\n\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/couchbase-server.service \u2192 \/lib\/systemd\/system\/couchbase-server.service.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-deb\">Install using DEB Binary Package<\/h3>\n\n\n\n<p>To install Couchbase Server on Ubuntu via DEB binary package, navigate to the Couchbase&nbsp;<a href=\"https:\/\/www.couchbase.com\/downloads\" target=\"_blank\" rel=\"noreferrer noopener\">downloads page<\/a> and select the appropriate package&nbsp;of Couchbase Server to install and grab the link for the DEB binary package.<\/p>\n\n\n\n<p>For example, the command below downloads version 7.0.2 of Couchbase server for Ubuntu 20.04;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/packages.couchbase.com\/releases\/7.0.2\/couchbase-server-community_7.0.2-ubuntu20.04_amd64.deb<\/code><\/pre>\n\n\n\n<p>Next, run the command to install Couchbase server on Ubuntu 20.04\/Ubuntu 22.04. Note that currently, as of this writing, there is no binary for Ubuntu 22.04, but the binary for Ubuntu 20.04 should still work.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install .\/couchbase-server-community_7.0.2-ubuntu20.04_amd64.deb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Open Couchbase Ports on Firewall<\/h3>\n\n\n\n<p>Couchbase server uses <a href=\"https:\/\/docs.couchbase.com\/server\/current\/install\/install-ports.html\" target=\"_blank\" rel=\"noreferrer noopener\">various TCP ports<\/a> for network communication. If you are running a system level or edge firewall, be sure to open these ports where necessary.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow to any port 369,8091:8094,9100:9105,9998,9999,11209:11211,11214,11215,18091:18093,21100:21299 proto tcp comment \"Couchbase TCP ports\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Access the Couchbase Web Console<\/h3>\n\n\n\n<p>You can now access your Couchbase web console via the url <strong><code>http:\/\/server-IP-or-domain-name:8091<\/code><\/strong>.<\/p>\n\n\n\n<p>Upon accessing the url, you will be promted to either join an existing Couchbase cluster or create a new cluster.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-cluster.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1064\" height=\"589\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-cluster.png\" alt=\"install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04\" class=\"wp-image-11934\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-cluster.png?v=1648298373 1064w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-cluster-768x425.png?v=1648298373 768w\" sizes=\"(max-width: 1064px) 100vw, 1064px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>In my setup, I don&#8217;t have an existing cluster. Hence, I will create a new one. Hence, enter the name of the cluster, admin username and password.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-new-cluster-creds.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"534\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-new-cluster-creds.png\" alt=\"install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04\" class=\"wp-image-11935\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-new-cluster-creds.png?v=1648298407 1011w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-server-new-cluster-creds-768x406.png?v=1648298407 768w\" sizes=\"(max-width: 1011px) 100vw, 1011px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Next, accept the EULA and choose whether to setup disk, ram and services or finish with defaults. We choose finish with defaults in this setup.<\/p>\n\n\n\n<p>Sample Couchbase server dashboard;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1912\" height=\"699\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-servers.png\" alt=\"\" class=\"wp-image-11936\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-servers.png?v=1648298431 1912w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-servers-768x281.png?v=1648298431 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-servers-1536x562.png?v=1648298431 1536w\" sizes=\"(max-width: 1912px) 100vw, 1912px\" \/><\/figure>\n\n\n\n<p>And there you go. You have learnt how to install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04.<\/p>\n\n\n\n<p>Further Reading<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/current\/manage\/manage-nodes\/create-cluster.html#new-custer-set-up-next-steps\" target=\"_blank\" rel=\"noreferrer noopener\">Next Couchbase Cluster Setup Steps<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/easily-integrate-linux-malware-detect-with-clamav\/\">Easily Integrate Linux Malware Detect with ClamAV<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-setup-teleport-access-plane-on-linux\/\">Install and Setup Teleport Access Plane on Linux<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04. According to the documentation, Couchbase Server is an open source,<\/p>\n","protected":false},"author":1,"featured_media":11937,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,39],"tags":[4746,4747,4743,4744,4745],"class_list":["post-1605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-storage","tag-couchbase-server-install","tag-how-to-install-couchbase","tag-install-couchbase-server-ubuntu","tag-ubuntu-20-04-couchbase-server","tag-ubuntu-22-04-couchbase-server","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1605"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=1605"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1605\/revisions"}],"predecessor-version":[{"id":20432,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1605\/revisions\/20432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11937"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=1605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=1605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}