Installing MongoDB on a Mac with Homebrew

CK CK 3788 
Created at
Updated at  
1,245 0 0

Installing MongoDB on Mac OS X
 

1. Open the Terminal app and type

% brew update

 

2. After updating Homebrew

% brew install mongodb

 

After downloading Mongo, create the “db” directory. This is where the Mongo data files will live. You can create the directory in the default location by running

% sudo mkdir -p /data/db
% sudo chown [user_name] /data/db

Run the Mongo daemon, in one of your terminal windows run

% mongod

 

This should start the Mongo server.

Run the Mongo shell, with the Mongo daemon running in one terminal, type below in another terminal window.

mongo
  1. This will run the Mongo shell which is an application to access data in MongoDB.
  2. To exit the Mongo shell run quit()
  3. To stop the Mongo daemon hit ctrl-c


Installing MongoDB Driver running on PHP

  • Before installing MongoDB driver, you should check your PHP version first. Actually there are various version of PHP version. In my case, php version is 7.1.7
%php -ver
PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

 

Tags Homebrew Mac Mac OS X MongoDB Facebook X
Comments 0
Similar posts
  1. How do I input switch Korean to Chinese on Mac?
    919
  2. The Ultimate Data Engineering Roadmap
    1,084
  3. How to run Python 3.9 on Mac?
    656
  1. Is a Used M1 or M2 MacBook Pro a Smart Buy Over M4?
    298
  2. Controlling Two Macs with One Keyboard — It Really Feels Like Magic
    1,218
Recently updated
  1. Google OAuth Token Expiration: Causes and Solutions
    31
  2. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    57
  3. Why SPF and DKIM Are Essential for Linux Email Servers?
    51
  4. How do I create animated background for Google Meet?
    23,238
  5. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    273
  6. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    104
  7. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    170
  8. Array of arguments passed to script in PHP
    99
  9. Invalid Auction Storms in Ad Tech
    107
  10. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    208
  11. The Two Clocks of Ad Server Architecture
    78
  12. Frequency Cap Architecture Overview
    527
  13. Collecting Proof-of-Play from 100,000 Screens
    153
  14. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    303
  15. What is RedisVL?
    116
  16. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    247
  17. TPU & GPU Cluster Management Tools
    258
  18. The Concept of Scaffolding in AI Agents
    245
  19. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    598
  20. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    269
  21. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    354
  22. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    207
  23. Machine Learning: Training vs. Ranking
    230
  24. The Continuous Learning Machine: Designing a Loop That Actually Turns
    228
  25. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    204
  26. Designing a Data Curation System Around a Vector Database
    230
  27. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    263
  28. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    674
  29. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    201
  30. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    233