如何在 Ubuntu 18.04 Bionic Beaver Linux 上安装 Couchbase Server
客观的
目标是在 Ubuntu 18.04 Bionic Beaver Linux 上安装 Couchbase Enterprise 或 Community Server
操作系统和软件版本
操作系统: – Ubuntu 18.04 Bionic Beaver
软件: – Couchbase Server 5.0.1 Enterprise 或 Community Edition 或更高版本
要求
需要以 root 身份或通过 sudo 命令对 Ubuntu 系统进行特权访问。
困难
简单的
惯例
# – 要求以root权限直接以root用户身份或使用
sudo
命令执行给定的linux命令$ – 要求以常规非特权用户身份执行给定的 Linux 命令
指示
下载 Couchbase 服务器
首先,下载 Couchbase Server 社区版。导航到下载页面并下载 Couchbase Server debian 软件包。如果 Ubuntu 18.04 版本仍然不可用,那么 16.04 版本也可以。将下载的 DEB 文件保存到您的主目录中,例如:
$ ls couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb
couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb
或者使用 wget
下载 Couchbase 服务器包。请在适当的情况下更新版本号:
COUCHBASE SERVER COMMUNITY EDITION:
$ wget https://packages.couchbase.com/releases/5.0.1/couchbase-server-community_5.0.1-ubuntu16.04_amd64.deb
COUCHBASE SERVER ENTERPRISE EDITION:
$ wget https://packages.couchbase.com/releases/5.0.1/couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb
安装 Couchbase 服务器
我们将使用 gdebi 命令在 Ubuntu 18.04 上安装 Couchbase Server。 gdebi
将自动下载并安装所有必备组件。如果您的系统上没有 gdebi 命令,您可以通过以下方式安装它:
$ sudo apt install gdebi-core
准备就绪后,安装之前下载的 Couchbase Server DEB 包。出现提示时,点击 y
继续安装:
$ sudo gdebi couchbase-server-enterprise_5.0.1-ubuntu16.04_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
Requires the installation of the following packages: libpython-stdlib python python-httplib2 python-minimal python2.7 python2.7-minimal
Couchbase Server
Couchbase is the company behind the Couchbase open source project, a
vibrant community of developers and users of Couchbase
document-oriented database technology. Our flagship product, Couchbase
Server, is a packaged version of Couchbase technology that's available
in Community and Enterprise Editions. We're known for our easy
scalability, consistent high performance, 24x365 availability, and a
flexible data model. Read more about Couchbase Server here -
http://www.couchbase.com/nosql-databases/couchbase-server
Do you want to install the software package? [y/N]:y
安装后,您的 Couchbase 服务器应该启动并运行:
$ service couchbase-server status
● couchbase-server.service - Couchbase Server
Loaded: loaded (/lib/systemd/system/couchbase-server.service; enabled; vendor preset: enabled)
Active: active (running); 9min ago
Docs: http://docs.couchbase.com
Main PID: 15686 (beam.smp)
Tasks: 153 (limit: 4915)
Couchbase服务器的防火墙规则
如果您在 Ubuntu 18.04 服务器上禁用了防火墙,只需将浏览器导航到 http://SERVER-IP-OR-HOSTNAME:8091
即可开始配置。否则,根据 Couchbase Server 的要求,使用以下命令允许 UFW 防火墙上的传入 TCP 端口:
$ sudo ufw allow from any to any port 369,8091:8094,9100:9105,9998,9999,11209:11211,11214,11215,18091:18093,21100:21299 proto tcp