![]() ![]() Save the file and mongodb installation and setup is complete. Open up your ~/.bash_profile and append the following commands to the end:Īlias mongod='~/mongodb/bin/mongod -dbpath ~/mongodb/data/db' I created some aliases in bash to point mongodb to the proper directory. Since mongodb checks that the /data/db directory exists before it can start up, the mongod command will fail. So, I created the directory in another folder (the mongodb folder containing the extracted files). Running the command mkdir -p /data/db on macOS Big Sur throws the error mkdir: /data/db: Read-only file system (the root folder is no longer writable since the Catalina update). ![]() Create the folder where mongodb stores data which is /data/db.Move the files into a new folder with a readable name mv mongodb-macos-x86_64-4.4.4 mongodb.Extract mongodb from the archive cd ~/ & tar zxvf mongodb-macos-x86_64-4.4.4.tgz.I love to install all my tools in my home directory so we’ll move the downloaded archive to the home directory - mv mongodb-macos-x86_64-4.4.4.tgz ~/.Open the terminal and change directory to the Downloads folder cd Downloads.Go to mongodb official download page and download the compressed. ![]() Steps to install the latest version of mongodb Downloading and extracting the compressed file from mongodb’s official website.Using homebrew (not covered in this tutorial).There are two ways to install mongodb on mac In this tutorial, I will explain the process involved in installing mongodb and some of the challenges I faced installing it on the latest version of macOS. MongoDB is a popular NoSQL (not only SQL) database which has seen wide adoption in the industry because of its ease of use and efficiency.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |