Javatpoint Logo
Javatpoint Logo

How to Install CouchDB on MacOS

Introduction

Apache CouchDB is an open source database software that focuses on ease of use and having a scalable architecture. It has a document-oriented database architecture and is implemented in the concurrency-oriented language Erlang. It stores data as JSON objects.

It was first released in 2005 and later became a part of Apache software foundation in 2008. In this tutorial, we will learn the process involved in the installation of CouchDB on MacOS.

Prerequisites

  • MacOS
  • Login as an administrator on terminal.
  • Homebrew must be installed on the system.

Installation

The following steps are used to install CouchDB on MacOS.

1) Update local repository Index of Homebrew package installer

We first need to update the repository index of Homebrew Package Installer which is used to install new packages on Mac Operating System.

Use following command to update

2) Install using homebrew

After updating homebrew, we need to install CouchDB. This will install all of its dependencies and resources.

Macos CouchDB 1

3) Start CouchDB

In order to run CouchDB, we need to start the CouchDB server which is installed on the path /usr/local/Cellar/couchdb. To do so, we need specify the path of installation directory with launchctl command

Macos CouchDB 2

After starting CouchDB, we need to check whether the server is running properly or not. Use the following command to do so.

Where 5984 is the default port of CouchDB.

Macos CouchDB 3

We could do that in browser also by typing localhost:5984 in the browser's search bar.

4) Create Database

We can create database by opening CouchDB in the browser. To do that we will type http://127.0.0.1:5984/_utils . This will look like following.

Macos CouchDB 4

To create database, we can click on the Create Database. This will prompt a popup window asking the database name. Type the name and press Enter.

Macos CouchDB 5

This will create the database named JavaTPoint. Our newly created database javatpoint can now be seen in the list of databases.

Macos CouchDB 6

5) Stop Database

To stop database, launchctl command is used with unload option.

Macos CouchDB 7

Well, we have successfully installed CouchDB on our MacOS.






Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA