Installing Mongodb on a Mac
January 26, 2019
go to download
$ cd ~/downloads
extract the tar from the download
$ tar xvf mongodb-osx-x86_64-3.0.0.tgz
enter bin
$ cd mongodb-osx-x86_64-3.0.0
$ cd bin
enter bash with privileges
$ sudo bash
create mongodb data store and set permissions
$ mkdir -p /data/db
$ chmod 777 /data
$ chmod 777 /data/db
confirm directories set with correct permissions
$ ls -ld /data/db
set PATH
$ cp * /usr/local/bin
$ exit
Verify mongo is in PATH
$ which mongod
$ which mongo
Start mongodb
$ mongod
Start mongodb shell
$ mongo