couchdb 安装_如何在Ubuntu上安装CouchDB –分步指南

couchdb 安装

In this tutorial, we’ll go over how to install CouchDB on Ubuntu. CouchDB is a NoSQL database that allows us to interact with stored data in a non-relational manner. There are multiple types of NoSQL database structures and among them, CouchDB is a Document-oriented database. NoSQL databases have existed for a long time but only recently came into common use because of the vast amount of unrelated data that needs to be handled.

在本教程中,我们将介绍如何在Ubuntu上安装CouchDB。 CouchDB是NoSQL数据库,允许我们以非关系方式与存储的数据进行交互。 NoSQL数据库结构有多种类型,其中CouchDB是面向文档的数据库。 NoSQL数据库已经存在很长时间了,但是由于需要处理大量无关数据,因此直到最近才开始使用。

在Ubuntu上安装CouchDB (Install CouchDB on Ubuntu)

Installing CouchDB on Ubuntu is a simple process. We begin by adding the required Apache CouchDB repositories in our sources.list and then install the CouchDB package and run through the configuration.

在Ubuntu上安装CouchDB是一个简单的过程。 首先,在sources.list中添加所需的Apache CouchDB存储库,然后安装CouchDB包并运行配置。

Let’s go over this process in detail and in a complete step-by-step manner with screenshots for reference. If you follow through the tutorial, you will have a working CouchDB set up on your Ubuntu or Debian server.

让我们以完整的逐步方式详细介绍此过程,并提供屏幕快照以供参考。 如果您按照本教程进行操作,则将在Ubuntu或Debian服务器上设置一个有效的CouchDB。

CouchDB安装演练 (CouchDB Installation Walkthrough)

Let’s add the required repository to our sources.list file. There are two ways to do it. You can either add the repository by manually copying and pasting it at the end of the file in the sources.list file, or combine the echo and the tee command in Linux.

让我们将所需的存储库添加到我们的sources.list文件中。 有两种方法可以做到这一点。 您可以通过手动将存储库复制并粘贴到sources.list文件中文件的末尾来添加存储库,也可以在Linux中结合使用echo和tee命令

将CouchDB存储库添加到APT源 (Add CouchDB Repository to APT Sources)


$ echo "deb https://apache.bintray.com/couchdb-deb {distribution} main" | tee -a /etc/apt/sources.list

Add sudo to the above command if you receive an error about permission being denied and are not able to complete the action.

如果收到关于权限被拒绝并且无法完成操作的错误,请在上述命令中添加sudo

Couchdb Add Repository
Couchdb Add Repository
Couchdb添加存储库

Alternatively, you can manually add the same repository to sources.list file. To do so, open the /etc/apt/sources.list file in your favorite text editor and paste the following line at the end of the file.

或者,您可以手动将相同的存储库添加到sources.list文件。 为此,请在您喜欢的文本编辑器中打开/etc/apt/sources.list文件,并将以下行粘贴到文件末尾。


deb https://apache.bintray.com/couchdb-deb bionic main

添加CouchDB公钥 (Add CouchDB Public Keys)

Next, we need to add the public keys to make sure we can download from the CouchDB repository so, let’s get the public key file with the wget command.

接下来,我们需要添加公共密钥以确保可以从CouchDB存储库下载,因此,让我们使用wget命令获取公共密钥文件。


root@ubuntu:~# wget https://couchdb.apache.org/repo/bintray-pubkey.asc
Download Couchdb Public Keys
Download Couchdb Public Keys
下载Couchdb公钥

Once done, we can run the apt-key add command to install the keys to the key database.

完成后,我们可以运行apt-key add命令将密钥安装到密钥数据库中。


root@ubuntu:~# apt-key add bintray-pubkey.asc
Apt Key Add Couchdb Keys
Apt Key Add Couchdb Keys
Apt键添加Couchdb键

在Ubuntu上更新存储库并安装CouchDB (Update Repositories and Install CouchDB on Ubuntu)

We’ll perform both of the actions above with a single command by combining them with the use of the && operator.

通过将它们与&&运算符结合使用,我们将使用单个命令执行上述两个操作。


root@ubuntu:~# apt update && apt install -y couchdb

You should now see a prompt that allows you to configure the CouchDB login credentials and interfaces.

现在,您应该看到提示,允许您配置CouchDB登录凭据和界面。

Configure Couchdb Prompt
Configure CouchDB Prompt
配置CouchDB提示
Couchdb Interface Setup
Couchdb Interface Setup
Couchdb界面设置

We either select standalone or clustered based on what pre-configuration we need or you can begin with none to set up everything from scratch.

我们可以根据需要的预配置选择独立的还是集群的,也可以从零开始,从头开始设置所有内容。

On the interface setup page, you can enter the localhost IP if you want the CouchDB to be accessible only via the loopback interface. If you want it to be accessible across the network, add 0.0.0.0 as I’ve done in the above screenshot.

如果希望仅可通过环回接口访问CouchDB,则可以在接口设置页面上输入localhost IP。 如果您希望它可以通过网络访问,请添加0.0.0.0(如上图所示)。

Once you’re done with that, you’ll be required to set up the default administrator password.

完成此操作后,将需要设置默认的管理员密码。

结论 (Conclusion)

We now have a working CouchDB setup in our Ubuntu systems. You can log into the server by opening your browser and entering the localhost IP address in your URL bar and login with the admin username and password.

现在,我们的Ubuntu系统中有一个有效的CouchDB设置。 您可以通过打开浏览器并在URL栏中输入localhost IP地址登录服务器,然后使用admin用户名和密码登录。

翻译自: https://www.journaldev.com/33852/install-couchdb-ubuntu

couchdb 安装

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值