{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/install-mongodb-apple-m1-chip/",
    "result": {"data":{"site":{"siteMetadata":{"title":"CrewCode Solutions"}},"markdownRemark":{"id":"963cc0ea-ea66-5deb-89f2-73b457948543","excerpt":"In this article i will explain you about installing MongoDb 5.0 community edition on apple mac os m1 chip processor Step 1: Install Xcode Command-Line Tools…","html":"<p>In this article i will explain you about installing MongoDb 5.0 community edition on apple mac os m1 chip processor</p>\n<h4>Step 1: Install Xcode Command-Line Tools</h4>\n<p>Homebrew requires the Xcode command-line tools from Apple's Xcode. Copy paste the following command in your macOS terminal</p>\n<pre><code class=\"language-js\">xcode-select --install\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-1.png\" alt=\"x-code\"></p>\n<h4>Step 2: Install Homebrew</h4>\n<p>Homebrew helps in installation of software on Apple's operating system, macOS, as well as Linux. Copy paste the following command in your macOS terminal to install homebrew</p>\n<pre><code class=\"language-js\">/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-2.png\" alt=\"home-brew\"></p>\n<p>Follow this link for more home brew commands\n<a href=\"https://brew.sh/#install\">Home brew installation</a>.</p>\n<h4>Step 3: Installing MongoDB 5.0 Community Edition</h4>\n<ol>\n<li>\n<h6>Run the following command , this will download the official Homebrew formula for MongoDB and the Database Tools</h6>\n</li>\n</ol>\n<pre><code class=\"language-js\">brew tap mongodb/brew\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-3.png\" alt=\"home-brew-tap\"></p>\n<ol start=\"2\">\n<li>\n<h6>To install MongoDB, run the following command in your macOS Terminal application:</h6>\n</li>\n</ol>\n<pre><code class=\"language-js\">brew install mongodb-community@5.0\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-4.png\" alt=\"install-mongodb\"></p>\n<p>As you can see in the above image mongodb is already installed in my computer so it is asking to re install</p>\n<p>Once finish running above command you will be able to install</p>\n<ul>\n<li>\n<h6>The mongod server</h6>\n</li>\n<li>\n<h6>The mongos sharded cluster query router</h6>\n</li>\n<li>\n<h6>The MongoDB Shell, mongosh</h6>\n</li>\n</ul>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-5.png\" alt=\"running-mongodb\">.</p>\n<h4>Step 4: Running MongoDB server and mongosh command</h4>\n<p>After finishing installation we need to start MongoDB server in order to run mongosh database queries and commands</p>\n<ul>\n<li>\n<h6>To run MongoDB (i.e. the mongod process) as a macOS service, run:</h6>\n</li>\n</ul>\n<pre><code class=\"language-js\">brew services start mongodb-community@5.0\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-6.png\" alt=\"start-mongodb-homebrew\"></p>\n<ul>\n<li>\n<h6>To stop a mongod running as a macOS service, use the following command as needed:</h6>\n</li>\n</ul>\n<pre><code class=\"language-js\">brew services stop mongodb-community@5.0\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-7.png\" alt=\"stop-mongodb-homebrew\"></p>\n<ul>\n<li>\n<h6>To run MongoDB (i.e. the mongod process) manually as a background process, run:</h6>\n</li>\n</ul>\n<pre><code class=\"language-js\">mongod --config /opt/homebrew/etc/mongod.conf --fork\n</code></pre>\n<p><img src=\"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/Install-Mongodb-on-Apple-M1-chip-8.png\" alt=\"manual-process\"></p>\n<h4>Step 5: Watch our you tube video to follow the above steps</h4>\n<p><a href=\"https://www.youtube.com/watch?v=MHneKZAGsbY\" title=\"Docker setup\"><img src=\"https://img.youtube.com/vi/MHneKZAGsbY/hqdefault.jpg\" width=\"100%\"></a></p>","fields":{"slug":"/install-mongodb-apple-m1-chip/"},"frontmatter":{"title":"Install MongoDB on Apple M1 chip","date":"October 10, 2022","description":"This will explain you step by step to install mongodb 5.0 community edition on apple mac os m1 chip processor","bannerimage":"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/mongo.jpg"}},"previous":{"fields":{"slug":"/how-to-work-with-angular-universal/"},"frontmatter":{"title":"How to add angular universal for server side rendering in your angular application","date":"October 01, 2022","bannerimage":"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/angular-universal.jpeg"}},"next":{"fields":{"slug":"/install-mysql-server-apple-m1-chip/"},"frontmatter":{"title":"Install and Connect MySQL and MySQL Workbench on Apple M1 chip","date":"October 20, 2022","bannerimage":"https://crew-code-images.s3.us-east-1.amazonaws.com/blog_images/MySql.jpg"}}},"pageContext":{"id":"963cc0ea-ea66-5deb-89f2-73b457948543","previousPostId":"735286e7-b398-58cf-a138-0a8404d5ee5e","nextPostId":"b7c269f5-28ce-5131-b84d-3ff6adea9dac"}},
    "staticQueryHashes": ["3860684146"]}