![Install MongoDB on Unix-Linux-macOS Install MongoDB on Unix-Linux-macOS](https://code2care.org/macos/installing-mongodb-on-linux-unix-macos-or-ubuntu/images/Install MongoDB on Unix-Linux-macOS.png)
In this article, we will take a look at how to install MongoDB on Linux/Unix/macOS/Ubuntu systems,
- Open Terminal,
- Run command apt-get install mongodb (for Linux/Ubuntu) or use homebrew install brew install mongodb if on macOS.
# apt-get install mongodb Reading package lists... Done .. The following additional packages will be installed: libboost-filesystem1.71.0 libboost-iostreams1.71.0 libboost-program-options1.71.0 libgoogle-perftools4 libpcap0.8 libpcrecpp0v5 libsnappy1v5 libstemmer0d libtcmalloc-minimal4 libyaml-cpp0.6 mongo-tools mongodb-clients mongodb-server mongodb-server-core .. After this operation, 215 MB of additional disk space will be used. Do you want to continue? [Y/n] Y .. Get:10 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 mongo-tools arm64 3.6.3-0ubuntu1 [10.3 MB] .. Get:14 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 mongodb-server all 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3 [12.5 kB] Get:15 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 mongodb arm64 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3 [9640 B] Fetched 49.3 MB in 29s (1711 kB/s) .. Setting up mongodb-clients (1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3) ... Setting up mongodb-server-core (1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3) ... Setting up mongodb-server (1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Created symlink /etc/systemd/system/multi-user.target.wants/mongodb.service → /lib/systemd/system/mongodb.service. Setting up mongodb (1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3) ... Processing triggers for libc-bin (2.31-0ubuntu9.7) ... Processing triggers for systemd (245.4-4ubuntu3.15) ...
- Run mongod to check instalaation:
# mongod 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] MongoDB starting : pid=4823 port=27017 dbpath=/data/db 64-bit host=b2391b608026 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] db version v3.6.8 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] git version: 8e540c0b6db93ce994cc548f000900bdc740f80a 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] allocator: tcmalloc 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] modules: none 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] build environment: 2022-04-08T12:51:27.517-0700 I CONTROL [initandlisten] distarch: aarch64 2022-04-08T12:51:27.518-0700 I CONTROL [initandlisten] target_arch: aarch64
More Posts related to MacOS,
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
More Posts:
- Customize Praise badge for Microsoft Teams with own images, values, brand - Microsoft
- Fix: TypeError: can only concatenate str (not int) to str in Python - Python
- How to generate client id and secret to register SharePoint App with OAuth - SharePoint
- How to change file or directory owner in Linux - Linux
- How to display File CR LF Newline Characters in Sublime Text - Sublime-Text
- 32: Python Program to Find Square Root of a Number - Python-Programs
- How to Download Windows Notepad Text Editor - Windows
- Bash command to wait for seconds - Bash