{"id":11940,"date":"2022-03-26T21:10:54","date_gmt":"2022-03-26T18:10:54","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11940"},"modified":"2024-03-09T10:56:15","modified_gmt":"2024-03-09T07:56:15","slug":"install-couchbase-server-on-debian","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-couchbase-server-on-debian\/","title":{"rendered":"Install Couchbase Server on Debian 11\/Debian 10"},"content":{"rendered":"\n
In this tutorial, you will learn how to install Couchbase Server on Debian 11\/Debian 10. According to the documentation<\/a>, 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 Couchbase is available in different editions<\/a>; Enterprise, Community and Couchbase Capella.<\/p>\n\n\n\n This guide is about how to install the community edition couch base server.<\/p>\n\n\n\n Before you can proceed to install Couchbase Server on Debian, there are some few requirements needed;<\/p>\n\n\n\n Next, proceed to install Couchbase Server.<\/p>\n\n\n\n There are different ways in which you can install Couchbase server;<\/p>\n\n\n\n On Debian 10 Buster;<\/p>\n\n\n\n On Debian 11;<\/p>\n\n\n\n Sample installation output;<\/p>\n\n\n\n To install Couchbase Server on Debian via DEB binary package, navigate to the Couchbase downloads page<\/a> and select the appropriate package of Couchbase Server to install and grab the link for the DEB binary package.<\/p>\n\n\n\n For example, the command below downloads version 7.0.2 of Couchbase server for Debian 10;<\/p>\n\n\n\n Next, run the command to install Couchbase server on Debian 10\/Debian 11. Note that currently, as of this writing, there is no binary for Debian 11, but the binary for Debian 10 should still work.<\/p>\n\n\n\n When installed, Couchbase server service is started and enabled to run on system boot;<\/p>\n\n\n\n Check the status;<\/p>\n\n\n\n Sample output;<\/p>\n\n\n\n Couchbase server uses 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 You can as well use iptables if you want.<\/p>\n\n\n\n You can now access your Couchbase web console via the url 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 In my setup, I don’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 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 Dashboard with sample buckets loaded;<\/p>\n\n\n\n Sample Couchbase server dashboard;<\/p>\n\n\n\nInstall Couchbase Server on Debian 11\/Debian 10<\/h2>\n\n\n\n
System Requirements<\/h3>\n\n\n\n
\n
\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
systemctl daemon-reload<\/code><\/pre>\n\n\n\n
systemctl enable --now disable_thp<\/code><\/pre>\n\n\n\n
\n
echo 'vm.swappiness=0' > \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n
sysctl -p<\/code><\/pre>\n\n\n\n
\n
Install Couchbase Server on Debian using APT via Couchbase repositories<\/h3>\n\n\n\n
\n
wget https:\/\/packages.couchbase.com\/releases\/couchbase-release\/couchbase-release-1.0-amd64.deb<\/code><\/pre>\n\n\n\n
apt install .\/couchbase-release-1.0-amd64.deb<\/code><\/pre>\n\n\n\n
\n
apt update<\/code><\/pre>\n\n\n\n
\n
apt install couchbase-server-community<\/code><\/pre>\n\n\n\n
\n
echo 'deb [ arch=amd64 ] http:\/\/packages.couchbase.com\/releases\/couchbase-server\/community\/deb\/ buster buster\/main' \\\n> \/etc\/apt\/sources.list.d\/couchbase.list<\/code><\/pre>\n\n\n\n
\n
wget -qO- http:\/\/packages.couchbase.com\/ubuntu\/couchbase.key | gpg --dearmor > \/etc\/apt\/trusted.gpg.d\/couchbase.gpg<\/code><\/pre>\n\n\n\n
\n
apt update<\/code><\/pre>\n\n\n\n
\n
apt install couchbase-server-community<\/code><\/pre>\n\n\n\n
\nPreparing to unpack ...\/couchbase-server-community_7.0.2-6703-1_amd64.deb ...\nMinimum RAM required : 4 GB\nSystem RAM configured : 1.95 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:\/\/debian: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
Install using DEB Binary Package<\/h3>\n\n\n\n
wget https:\/\/packages.couchbase.com\/releases\/7.0.2\/couchbase-server-community_7.0.2-debian10_amd64.deb<\/code><\/pre>\n\n\n\n
apt install .\/couchbase-server-community_7.0.2-debian10_amd64.deb<\/code><\/pre>\n\n\n\n
Running Couchbase Server Service<\/h3>\n\n\n\n
systemctl status couchbase-server<\/code><\/pre>\n\n\n\n
\n\u25cf couchbase-server.service - Couchbase Server\n Loaded: loaded (\/lib\/systemd\/system\/couchbase-server.service; enabled; vendor preset: enabled)\n Drop-In: \/etc\/systemd\/system\/couchbase-server.service.d\n \u2514\u2500override.conf\n Active: active (running) since Sat 2022-03-26 13:46:09 EDT; 5min ago\n Docs: https:\/\/docs.couchbase.com\n Main PID: 1812 (beam.smp)\n Tasks: 169 (limit: 2359)\n Memory: 187.0M\n CGroup: \/system.slice\/couchbase-server.service\n \u251c\u25001812 \/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 ena\n \u251c\u25001828 \/opt\/couchbase\/lib\/erlang\/erts-10.7.2.7\/bin\/epmd -daemon\n \u251c\u25001877 erl_child_setup 200000\n \u251c\u25001894 \/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\/erl\n \u251c\u25001916 erl_child_setup 200000\n \u251c\u25001935 sh -s disksup\n \u251c\u25001936 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/memsup\n \u251c\u25001938 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/cpu_sup\n \u251c\u25001941 \/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 \/op\n \u251c\u25001948 erl_child_setup 200000\n \u251c\u25001967 sh -s disksup\n \u251c\u25001968 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/memsup\n \u251c\u25001970 \/opt\/couchbase\/lib\/erlang\/lib\/os_mon-2.5.1.1\/priv\/bin\/cpu_sup\n \u251c\u25001973 inet_gethost 4\n \u251c\u25001974 inet_gethost 4\n \u251c\u25001975 \/opt\/couchbase\/bin\/priv\/godu\n \u251c\u25001979 sh -s ns_disksup\n \u251c\u25001980 \/opt\/couchbase\/bin\/priv\/godu\n \u251c\u25001985 \/opt\/couchbase\/bin\/goport -graceful-shutdown=false -window-size=524288\n \u251c\u25001989 \/opt\/couchbase\/bin\/prometheus --config.file \/opt\/couchbase\/var\/lib\/couchbase\/config\/prometheus.yml --web.enable-admin-api --web.enable-lifecycle --storage\n \u251c\u25001997 inet_gethost 4\n \u251c\u25001998 inet_gethost 4\n \u251c\u25002002 \/opt\/couchbase\/bin\/saslauthd-port\n \u251c\u25002008 portsigar for ns_1@cb.local 1812\n \u251c\u25002009 \/opt\/couchbase\/bin\/goport -graceful-shutdown=false -window-size=524288\n \u251c\u25002013 \/opt\/couchbase\/bin\/goxdcr -sourceKVAdminPort=8091 -xdcrRestPort=9998 -isEnterprise=false -ipv4=required -ipv6=optional\n \u2514\u25002021 \/opt\/couchbase\/bin\/memcached -C \/opt\/couchbase\/var\/lib\/couchbase\/config\/memcached.json\n\nMar 26 13:46:09 debian systemd[1]: Started Couchbase Server.\n<\/code><\/pre>\n\n\n\n
Open Couchbase Ports on Firewall<\/h3>\n\n\n\n
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
Access the Couchbase Web Console<\/h3>\n\n\n\n
http:\/\/server-IP-or-domain-name:8091<\/code><\/strong>.<\/p>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n