Module 1 & 2 - Installation and Configuration Commands

Module 1 & 2 - Installation and Configuration Commands


To check the THP status

cat /sys/kernel/mm/transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/defrag

Disable THP

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

Check Swappiness:

cat /proc/sys/vm/swappiness

Disable Swappiness:

echo 0 > /proc/sys/vm/swappiness

Download a small meta package from Couchbase

curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-x86_64.rpm

Install the meta package

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

Install Couchbase Server

sudo yum install couchbase-server
 
[OR]
 
yum list couchbase-server --showduplicates
sudo yum install couchbase-server-version-build

Install using RPM:
(Change the server version accordingly)
 
wget https://packages.couchbase.com/releases/6.5.1/couchbase-server-enterprise-6.5.1-centos7.x86_64.rpm

Install Couchbase Server (Change the server version accordingly)

rpm --install couchbase-server-enterprise-6.5.1-centos7.x86_64.rpm

Verifying Installation

http://<server-IP-address>:8091/     (non-encrypted)
https://<server-IP-address>:18091/     (encrypted)

Check Status:

systemctl status couchbase-server

Starting and Stopping of Couchbase Server

sudo systemctl start couchbase-server
(or)
sudo service couchbase-server start


sudo systemctl stop couchbase-server
(or)
sudo service couchbase-server stop
 

Google Cloud Startup Script: Install Couchbase on GCP machine/VM

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo 0 > /proc/sys/vm/swappiness
curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-x86_64.rpm
sudo rpm -i ./couchbase-release-1.0-x86_64.rpm
sudo yum -y install couchbase-server-6.5.2-6634
systemctl enable couchbase-server

Allowed Ports In Firewall: 
 
Client-to-node Ports
********************
Unencrypted: 8091-8096, 9140, 11210, 11211
Encrypted: 11207, 18091-18096

Other Ports: 8091-8096,9140,18091-18096,11207-11211


Demoed cluster configuration:

VM Machine type : g1-small (1 vCPU, 1.7 GB memory)
Allocated Memory --> 80 % of RAM ( 80 % of 1732) = 1300 (approx)
 

AWS Startup Script: Install Couchbase on AWS machine/VM

source: https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/

Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0

--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"

#cloud-config
cloud_final_modules:
- [scripts-user, always]

--//
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"

#!/bin/bash
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo 0 > /proc/sys/vm/swappiness
curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-x86_64.rpm
sudo rpm -i ./couchbase-release-1.0-x86_64.rpm
sudo yum -y install couchbase-server-6.5.2-6634
systemctl enable couchbase-server
--//

Allowed Ports In Security Groups:

Client-to-node Ports 
********************
Unencrypted: 8091-8096, 9140, 11210, 11211
Encrypted: 11207, 18091-18096

8091-8096
9140
18091-18096
11207-11211
 
Note: Above are the commands used in Module 1 & 2 of the Couchbase Database Administration Course.

 

DISCLAIMER

Use the content of this website at your own risk.

The purpose of sharing the content on this website is to Educate. The author/owner of the content do not warrant that the information provided on this website is fully complete and shall not be responsible for any errors or omissions.The author/owner shall have neither liability nor responsibility to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the contents of this website.

This content has been shared under Educational And Non-Profit Purposes Only. No Copyright Infringement Intended, All Rights Reserved to the Actual Owner.

For Copyright Content Removal Please Contact us by Email at besttechreads[at]gmail.com

Post a Comment

Previous Post Next Post