sudo fallocate -l 4G /swapfile- Creates a 4GB swapfilesudo chmod 600 /swapfile- only root accesssudo mkswap /swapfile- Mark as a swap spacesudo swapon /swapfile- Enables itecho "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab- Persist it over reboots
This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here
- Installing Homebrew is effortless, open Terminal and enter :
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"