How to Install CouchDB on MacOS
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.
- Login as an administrator on terminal.
- Homebrew must be installed on the system.
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.
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
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.
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.
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.
This will create the database named tutoraspire. Our newly created database tutoraspire can now be seen in the list of databases.
5) Stop Database
To stop database, launchctl command is used with unload option.
Well, we have successfully installed CouchDB on our MacOS.