如何在 Ubuntu 22.04 LTS 上安装 Apache CouchDB

2023年 7月 20日 34.0k 0

Apache CouchDB是一个面向NoSQL文档的数据库系统,以其简单性,可扩展性和容错性而闻名。它旨在帮助您在分布式环境中轻松存储、管理和检索数据。CouchDB 有一个 RESTful API,使您能够使用 HTTP 请求与数据库进行交互。

CouchDB-logo

在 Ubuntu 22.04 LTS Jammy Jellyfish 上安装 Apache CouchDB

第 1 步。首先,通过在终端中运行以下命令,确保所有系统软件包都是最新的。apt

sudo apt update
sudo apt upgrade

第 3 步。在 Ubuntu 22.04 上安装 Apache CouchDB。

默认情况下,Apache CouchDB 软件包在默认的 Ubuntu 22.04 仓库中不可用,因此您需要将 CouchDB 仓库添加到您的系统中。运行以下命令以添加 Icinga 存储库:

echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ jammy main" | sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null

接下来,使用以下命令添加 GPG 密钥:

curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1 source /etc/os-release

添加 CouchDB 存储库后,通过运行以下命令更新系统并安装 CouchDB 软件包:

sudo apt update
sudo apt install couchdb

第一个提示询问 CouchDB 配置的类型:

                  ┌─────────┤ Configuring couchdb ├─────────┐
                  │ General type of CouchDB configuration:  │ 
                  │                                         │ 
                  │               standalone                │ 
                  │               clustered                 │ 
                  │               none                      │ 
                  │                                         │ 
                  │                                         │ 
                  │                                     │ 
                  │                                         │ 
                  └─────────────────────────────────────────┘

出于演示目的,考虑到数据库安装在单个服务器中,独立选项是可行的方法。

接下来,输入接口 IP 地址并继续:

  ┌─────────────────────────┤ Configuring couchdb ├──────────────────────────┐
  │ A CouchDB node must bind to a specific network interface. This is done   │ 
  │ via IP address. Only a single address is supported at this time.         │ 
  │                                                                          │ 
  │ The special value '0.0.0.0' binds CouchDB to all network interfaces.     │ 
  │                                                                          │ 
  │ The default is 127.0.0.1 (loopback) for standalone nodes, and 0.0.0.0    │ 
  │ (all interfaces) for clustered nodes. In clustered mode, it is not       │ 
  │ allowed to bind to 127.0.0.1.                                            │ 
  │                                                                          │ 
  │ CouchDB interface bind address:                                          │ 
  │                                                                          │ 
  │ 127.0.0.1_______________________________________________________________ │ 
  │                                                                          │ 
  │                                                                      │ 
  │                                                                          │ 
  └──────────────────────────────────────────────────────────────────────────┘

您可以使用以下命令确认安装成功,并且服务正在运行:

curl http://127.0.0.1:5984/

安装完成后,您可以通过运行以下命令来启动 CouchDB 服务:

sudo systemctl enable couchdb
sudo systemctl start couchdb

第 4 步。访问 Apache CouchDB Web 界面。

一旦你安装并配置了Apache CouchDB,就该验证它是否正常运行了。您可以通过访问位于 的 CouchDB Web 界面来执行此操作。如果一切正常,您将看到一个登录屏幕。http://localhost:5984/_utils/

CouchDB-login-interface

感谢您使用本教程在 Ubuntu 22.04 LTS Jammy Jellyfish 系统上安装 Apache CouchDB 开源非关系数据库。有关其他帮助或有用信息,我们建议您查看 Apache 网站。

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论