{"id":11947,"date":"2022-03-28T22:31:32","date_gmt":"2022-03-28T19:31:32","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11947"},"modified":"2024-03-09T10:54:23","modified_gmt":"2024-03-09T07:54:23","slug":"install-couchbase-server-on-centos-rocky-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-couchbase-server-on-centos-rocky-linux\/","title":{"rendered":"Install Couchbase Server on CentOS\/Rocky Linux"},"content":{"rendered":"\n<p>In this tutorial, you will learn how to install Couchbase Server on CentOS\/Rocky Linux. 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 CentOS\/Rocky Linux<\/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 Couchbase 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, 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>Next, proceed to install Couchbase Server.<\/p>\n\n\n\n<p>There are different ways in which you can install Couchbase server;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#using-yum\">Install using YUM via Couchbase repositories<\/a><\/li>\n\n\n\n<li><a href=\"#using-rpm\">Install using RPM Binary Package<\/a><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-yum\">Install Couchbase Server using YUM via Couchbase repositories<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To install Install Couchbase Server via YUM, you first need to install Couchbase repositories;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install https:\/\/packages.couchbase.com\/releases\/couchbase-release\/couchbase-release-1.0-x86_64.rpm<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Couchbase server on Rocky Linux<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install couchbase-server-community<\/code><\/pre>\n\n\n\n<p>Sample installation output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\nRunning transaction\n  Preparing        :                                                                                                                                                    1\/1 \n  Installing       : ncurses-compat-libs-6.1-9.20180224.el8.x86_64                                                                                                      1\/3 \n  Installing       : bzip2-1.0.6-26.el8.x86_64                                                                                                                          2\/3 \n  Running scriptlet: couchbase-server-community-7.0.2-6703.x86_64                                                                                                       3\/3 \nMinimum RAM required  : 4 GB\nSystem RAM configured : 1.77 GB\n\nMinimum number of processors required : 4 cores\nNumber of processors on the system    : 2 cores\n\n\n  Installing       : couchbase-server-community-7.0.2-6703.x86_64                                                                                                       3\/3 \n  Running scriptlet: couchbase-server-community-7.0.2-6703.x86_64                                                                                                       3\/3 \nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/couchbase-server.service \u2192 \/usr\/lib\/systemd\/system\/couchbase-server.service.\n\nYou have successfully installed Couchbase Server.\nPlease browse to http:\/\/rocky8: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\n\n  Verifying        : bzip2-1.0.6-26.el8.x86_64                                                                                                                          1\/3 \n  Verifying        : ncurses-compat-libs-6.1-9.20180224.el8.x86_64                                                                                                      2\/3 \n  Verifying        : couchbase-server-community-7.0.2-6703.x86_64                                                                                                       3\/3 \n\nInstalled:\n  bzip2-1.0.6-26.el8.x86_64                   couchbase-server-community-7.0.2-6703.x86_64                   ncurses-compat-libs-6.1-9.20180224.el8.x86_64                  \n\nComplete!\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-rpm\">Install using RPM Binary Package<\/h3>\n\n\n\n<p>To install Couchbase Server via RPM binary package, navigate to the Couchbase\u00a0<a href=\"https:\/\/www.couchbase.com\/downloads\" target=\"_blank\" rel=\"noreferrer noopener\">downloads page<\/a> and select the appropriate package\u00a0of Couchbase Server to install and grab the link for the RPM binary package.<\/p>\n\n\n\n<p>Note, for Rocky Linux, we will use an RPM binary for CentOS 8. For example, the command below downloads version 7.0.2 of Couchbase server for CentOS 8 and installs it on Rocky Linux 8;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum localinstall https:\/\/packages.couchbase.com\/releases\/7.0.2\/couchbase-server-community-7.0.2-centos8.x86_64.rpm<\/code><\/pre>\n\n\n\n<p>You can run the same command above on CentOS 8;<\/p>\n\n\n\n<p>On CentOS 7;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum localinstall https:\/\/packages.couchbase.com\/releases\/7.0.2\/couchbase-server-community-7.0.2-centos7.x86_64.rpm<\/code><\/pre>\n\n\n\n<p>Check the downloads page for other RHEL distros.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Running Couchbase Server Service<\/h3>\n\n\n\n<p>When installed, Couchbase server service is started and enabled to run on system boot;<\/p>\n\n\n\n<p>Check the status;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status couchbase-server<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\n\u25cf couchbase-server.service - Couchbase Server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/couchbase-server.service; enabled; vendor preset: disabled)\n  Drop-In: \/etc\/systemd\/system\/couchbase-server.service.d\n           \u2514\u2500override.conf\n   Active: active (running) since Mon 2022-03-28 17:36:39 EAT; 1min 14s ago\n     Docs: https:\/\/docs.couchbase.com\n  Process: 64569 ExecStop=\/opt\/couchbase\/bin\/couchbase-server -k (code=exited, status=0\/SUCCESS)\n Main PID: 64606 (beam.smp)\n    Tasks: 168 (limit: 11388)\n   Memory: 175.6M\n   CGroup: \/system.slice\/couchbase-server.service\n           \u251c\u250064606 \/opt\/couchbase\/lib\/erlang\/erts-10.7.2.7\/bin\/beam.smp -A 16 -sbwt none -- -root \/opt\/couchbase\/lib\/erlang -progname erl -- -home \/opt\/couchbase -- -smp e>\n           \u251c\u250064621 \/opt\/couchbase\/lib\/erlang\/erts-10.7.2.7\/bin\/epmd -daemon\n           \u251c\u250064670 erl_child_setup 200000\n           \u251c\u250064689 \/opt\/couchbase\/lib\/erlang\/erts-10.7.2.7\/bin\/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -sbwt none -MMmcs 30 -e102400 -- -root \/opt\/couchbase\/lib\/e>\n           \u251c\u250064711 erl_child_setup 200000\n           \u251c\u250064732 sh -s disksup\n           \u251c\u250064734 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/memsup\n           \u251c\u250064735 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/cpu_sup\n           \u251c\u250064736 \/opt\/couchbase\/lib\/erlang\/erts-10.7.2.7\/bin\/beam.smp -P 327680 -K true -- -root \/opt\/couchbase\/lib\/erlang -progname erl -- -home \/opt\/couchbase -- -pa \/>\n           \u251c\u250064743 erl_child_setup 200000\n           \u251c\u250064762 sh -s disksup\n           \u251c\u250064764 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/memsup\n           \u251c\u250064765 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/cpu_sup\n           \u251c\u250064768 inet_gethost 4\n           \u251c\u250064769 inet_gethost 4\n           \u251c\u250064770 \/opt\/couchbase\/bin\/priv\/godu\n           \u251c\u250064774 sh -s ns_disksup\n           \u251c\u250064775 \/opt\/couchbase\/bin\/priv\/godu\n           \u251c\u250064780 \/opt\/couchbase\/bin\/goport -graceful-shutdown=false -window-size=524288\n           \u251c\u250064784 \/opt\/couchbase\/bin\/prometheus --config.file \/opt\/couchbase\/var\/lib\/couchbase\/config\/prometheus.yml --web.enable-admin-api --web.enable-lifecycle --stora>\n           \u251c\u250064792 inet_gethost 4\n           \u251c\u250064795 inet_gethost 4\n           \u251c\u250064796 \/opt\/couchbase\/bin\/saslauthd-port\n           \u251c\u250064801 \/opt\/couchbase\/bin\/goport -graceful-shutdown=false -window-size=524288\n           \u251c\u250064805 \/opt\/couchbase\/bin\/goxdcr -sourceKVAdminPort=8091 -xdcrRestPort=9998 -isEnterprise=false -ipv4=required -ipv6=optional\n           \u251c\u250064814 portsigar for ns_1@cb.local 64606\n           \u2514\u250064815 \/opt\/couchbase\/bin\/memcached -C \/opt\/couchbase\/var\/lib\/couchbase\/config\/memcached.json\n\nMar 28 17:36:39 rocky8 systemd[1]: Started Couchbase Server.\n<\/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>for i in 369 8091-8094 9100-9105 9998 9999 11209-11211 11214 11215 18091-18093 21100-21299; do firewall-cmd --add-port=$i\/tcp --permanent; done<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>You can as well use iptables if you want.<\/p>\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 CentOS\/Rocky Linux\" 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 CentOS\/Rocky Linux\" 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>Dashboard with sample buckets loaded;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-buckets.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1896\" height=\"943\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-buckets.png\" alt=\"Install Couchbase Server on CentOS\/Rocky Linux\" class=\"wp-image-11942\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-buckets.png?v=1648317570 1896w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-buckets-768x382.png?v=1648317570 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-buckets-1536x764.png?v=1648317570 1536w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Sample Couchbase server dashboard;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/couchbase-servers.png\" class=\"td-modal-image\"><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=\"Install Couchbase Server on CentOS\/Rocky Linux\" 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><\/a><\/div>\n\n\n\n<p>And there you go. You have learnt how to install Couchbase Server on Linux.<\/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<p>Other Tutorials<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-couchbase-server-on-debian\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Couchbase Server on Debian 11\/Debian 10<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-couchbase-server-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Couchbase Server on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to install Couchbase Server on CentOS\/Rocky Linux. According to the documentation, Couchbase Server is an open source, distributed,<\/p>\n","protected":false},"author":3,"featured_media":11950,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,299],"tags":[284,4752,4746,4755,4754,4753,3587],"class_list":["post-11947","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-database","tag-centos","tag-couchbase-server","tag-couchbase-server-install","tag-install-couchbase-linux","tag-install-couchbase-on-rocky-linux","tag-install-couchbase-server-on-centos","tag-rocky-linux-8","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\/11947"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=11947"}],"version-history":[{"count":5,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11947\/revisions"}],"predecessor-version":[{"id":20430,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11947\/revisions\/20430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11950"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=11947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=11947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=11947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}