Red Hat and CentOS Installation
Couchbase Server supports Red Hat (RHEL) and RHEL-based operating systems such as CentOS.
Before you start with the installation, ensure that dependency checking tool pkgconfig is installed. The Couchbase Server package requires this package to verify certain package dependencies have been met.
Check OpenSSL Dependency
The Couchbase Server RPM performs dependency checks using pkgconfig for RHEL. Verify that pkgconfig is installed, and install it if necessary:
sudo yum install -y pkgconfig
Upon successful installation, the following output appears:
Loaded plugins .... Installed: pkgconfig.x86_64 1:0.21-2.el5 Complete!
rpm -q -a | grep "openssl"
openssl-1.0.1e-16.el6_5.7.x86_64
If you are on one of the supported distributions, ensure that your OpenSSL version is up-to-date. If your distribution is not supported anymore, it is highly recommended that you transition to a supported operating system due to this bug’s severity.
Installing Using rpm
Install Couchbase Server on RHEL using the rpm command-line tool with the downloaded RPM package.
Only 64-bit systems are supported. See Supported Platforms for details.
Disable Transparent Huge Pages (THP)
RHEL6 and other newer Linux distributions are known to have Transparent Huge Pages (THP) feature enabled by default. THP can cause issues in database software, including Couchbase Server. THP can cause nodes to lose cluster heartbeats, resulting in erroneous automatic fail overs. Disabling Transparent Huge Pages (THP) prior to installing Couchbase Server is strongly encouraged.
Complete the Installation
You must be logged in as root (superuser) or use the sudo command to complete the installation. Use the following command to install the Couchbase Server package:
rpm --install couchbase-server-version.rpm
where version is the version number of the downloaded package.
After the rpm command completes, the Couchbase Server service starts automatically. It is configured to start automatically under OS runlevels 2, 3, 4, and 5. Refer to the Red Hat RPM documentation for more information about installing packages using RPM.
After installation is completed, the installation process displays a message similar to the following:
Minimum RAM required : 4 GB
System RAM configured : 8174464 kilobytes
Minimum number of processors required : 4 cores
Number of processors on the system : 4 cores
Starting couchbase-server[ OK ]
You have successfully installed Couchbase Server.
Browse to http://host_name:8091/ to configure your server.
Refer to http://couchbase.com for additional resources.
Update your firewall configuration
to allow connections to the following ports:
11211, 11210, 11209, 4369, 8091, 8092 and from 21100 to 21299.
By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.
After the installation is completed, use the service command to manage the Couchbase Server service, including checking the current status. Refer to the Ubuntu documentation for instructions.
To perform the initial Couchbase Server setup, open a web browser and access the Couchbase Web Console.
Installing as non-root, non-sudo
Installing on RHEL as a non-root, non-sudo user on a single machine.
A non-sudo, non-root installation still runs Couchbase Server and all Couchbase command-line tools.
- After downloading the Couchbase Server RPM, go to the directory where it is located and extract it:
rpm2cpio couchbase-server-enterprise_version.rpm | cpio --extract --make-directories --no-absolute-filenames
In the directory where the files were extracted, the opt and etc sub-directories are available.
- After you extract the Couchbase Server installation files, go to the sub-directory:
cd opt/couchbase
- Run the following script to relocate the Couchbase Server installation to the present working directory (PWD):
./bin/install/reloc.sh `pwd`
This enables you to continue the installation as a non-root, non-sudo user.
- To run the server, use
./bin/couchbase-server \-- -noinput -detached
- To stop the server, use
./bin/couchbase-server -k
Installing using yum
This installation uses a package management system.
To install on RHEL/CentOS version 6 or 7 using yum:
- Download and install the appropriate meta package from the package download location. This will install the package source and the Couchbase public keys:
curl -O http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-5-x86_64.rpm sudo rpm -i couchbase-release-1.0-5-x86_64.rpm
- Proceed with installing the actual Couchbase Server package:
sudo yum update
Then:
sudo yum install couchbase-server
Or:
sudo yum install couchbase-server-community
Installing Couchbase Official Repository in CentOS 8:
Couchbase software is provided through their official yum repository. Therefore, we need to install Couchbase yum repository first on our CentOS 8 operating system.
[root@couchbase-01 ~]# dnf install -y https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-x86_64.rpm Last metadata expiration check: 0:03:34 ago on Sun 06 Sep 2020 07:39:54 PM PKT. couchbase-release-1.0-x86_64.rpm 30 kB/s | 12 kB 00:00 Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Installing: couchbase-release x86_64 1.0-8 @commandline 12 k Transaction Summary ================================================================================ Install 1 Package Total size: 12 k Installed size: 5.7 k Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : couchbase-release-1.0-8.x86_64 1/1 Running scriptlet: couchbase-release-1.0-8.x86_64 1/1 Verifying : couchbase-release-1.0-8.x86_64 1/1 Installed: couchbase-release-1.0-8.x86_64 Complete!
Build cache for Couchbase yum repository.
[root@couchbase-01 ~]# dnf makecache CentOS-8 – AppStream 7.3 kB/s | 4.3 kB 00:00 CentOS-8 – Base 6.2 kB/s | 3.9 kB 00:00 CentOS-8 – Extras 3.7 kB/s | 1.5 kB 00:00 Couchbase Server 52 kB/s | 119 kB 00:02 Couchbase Server (Community Edition) 29 kB/s | 106 kB 00:03 Couchbase SDK package repository 8.2 kB/s | 6.7 kB 00:00 Metadata cache created.
Installing Couchbase Server on CentOS 8:
We have added Couchbase yum repository, therefore, we can install Couchbase software on our CentOS 8 system by using dnf command.
[root@couchbase-01 ~]# dnf install -y couchbase-server Last metadata expiration check: 0:53:49 ago on Sun 06 Sep 2020 07:48:23 PM PKT. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: couchbase-server x86_64 6.6.0-7909 couchbase-server 361 M Installing dependencies: bzip2 x86_64 1.0.6-26.el8 BaseOS 60 k Transaction Summary ================================================================================ Install 2 Packages Total download size: 361 M Installed size: 847 M Downloading Packages: (1/2): bzip2-1.0.6-26.el8.x86_64.rpm 271 kB/s | 60 kB 00:00 (2/2): couchbase-server-enterprise-6.6.0-centos 1.0 MB/s | 361 MB 05:56 ——————————————————————————– Total 1.0 MB/s | 361 MB 05:57 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : bzip2-1.0.6-26.el8.x86_64 1/2 Running scriptlet: couchbase-server-6.6.0-7909.x86_64 2/2 Minimum RAM required : 4 GB System RAM configured : 2.63 GB Minimum number of processors required : 4 cores Number of processors on the system : 1 cores Installing : couchbase-server-6.6.0-7909.x86_64 2/2 Running scriptlet: couchbase-server-6.6.0-7909.x86_64 2/2 You have successfully installed Couchbase Server. Please browse to http://couchbase-01.centlinux.com:8091/ to configure your server. Refer to http://docs.couchbase.com for additional resources. Please note that you have to update your firewall configuration to allow external connections to a number of network ports for full operation. Refer to the documentation for the current list: https://docs.couchbase.com/server/6.6/install/install-ports.html By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt. Verifying : bzip2-1.0.6-26.el8.x86_64 1/2 Verifying : couchbase-server-6.6.0-7909.x86_64 2/2 Installed: bzip2-1.0.6-26.el8.x86_64 couchbase-server-6.6.0-7909.x86_64 Complete!
The couchbase server has been installed successfully.
Set Process/File Descriptors Limits for Couchbase User:
The default process and file descriptor limits are not sufficient for couchbase users. Therefore, we need to explicitly increase these limits.
Create a configuration file in /etc/security/limits.d directory.
[root@couchbase-01 ~]# vi /etc/security/limits.d/couchbase.conf
And add the following settings therein.
couchbase soft nproc 10000 couchbase hard nproc 10000 couchbase soft nofile 70000 couchbase hard nofile 70000
Configure Linux Firewall for Couchbase:
Couchbase Server uses the following service ports.
- 8091/18091 – Cluster Administration Console (HTTP/HTTPS)
- 8092/18092 – Views and XDCR Access (HTTP/HTTPS)
- 8093/18093 – Query Service (HTTP/HTTPS)
- 8094/18094 – Search Service (HTTP/HTTPS)
- 8095/18095 – Analytics Service (HTTP/HTTPS)
- 8096/18096 – Eventing Service (HTTP/HTTPS)
- 9140 – Eventing Service Debugger
- 11210,11211,11207 – Data Service
Therefore, we need to allow incoming traffic to these ports, to make them accessible from the network.
[root@couchbase-01 ~]# firewall-cmd –permanent –add-port={8091-8096,9140,11210,11211,11207,18091-18096}/tcp success [root@couchbase-01 ~]# firewall-cmd –reload success