在Ubuntu 20.04 LTS Focal Fossa上安装Apache CouchDB
步骤1.首先,通过apt
在终端中运行以下以下命令,确保所有系统软件包都是最新的。
sudo apt update
sudo apt upgrade
步骤2.在Ubuntu 20.04上安装Apache CouchDB。
CouchDB正式出现在Ubuntu默认存储库中。运行以下命令以安装Apache CouchDB:
sudo apt install couchdb
安装程序将询问您是否要以群集或独立模式安装CouchDB。集群意味着将多个服务器连接在一起,作为一个分布式数据存储。
在安装过程中,您应该看到消息以选择某些选项:
┌──────────────────────────┤ Configuring couchdb ├──────────────────────────┐ │ │ │ Please select the CouchDB server configuration type that best meets your │ needs. │ │ For single-server configurations, select standalone mode. This will set │ up CouchDB to run as a single server. │ │ For clustered configuration, select clustered mode. This will prompt for │ additional parameters required to configure CouchDB in a clustered │ configuration. │ │ If you prefer to configure CouchDB yourself, select none. You will then │ need to edit /opt/couchdb/etc/vm.args and /opt/couchdb/etc/local.d/*.ini │ yourself. Be aware that this will bypass *all* configuration steps, │ including setup of a CouchDB admin user - leaving CouchDB in "admin │ │ │ │ └───────────────────────────────────────────────────────────────────────────┘
接下来,选择独立选项并继续:
┌─────────┤ 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_______________________________________________________________ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────────────────┘
步骤3.访问Apache CouchDB。
默认情况下,Apache CouchDB将在HTTP端口5984上可用。打开您喜欢的浏览器,然后导航至并完成所需的步骤以完成安装或运行以下curl命令,该命令将以JSON格式打印有关CouchDB数据库的信息:localhost:5984/_utils/
curl http://127.0.0.1:5984/
结果:
恭喜你!您已经成功安装了CouchDB。感谢您使用本教程在Ubuntu 20.04 Focal Fossa系统上安装Apache CouchDB。有关其他帮助或有用信息,我们建议您检查CouchDB官方网站。
原创文章,作者:校长,如若转载,请注明出处:https://www.yundongfang.com/Yun42038.html