Environment
- MongoDB 3.2.0
- OS X 10.11.0 (El Capitan)
Instalasi
Update Homebrew
$ brew update
Instal MongoDB
$ brew install mongodb
Instal MongoDB dengan dukungan TSL/SSL
$ brew install mongodb --with-openssl
Instal Rilis Terbaru MongoDB
$ brew install mongodb --devel
MongoDB Data
$ sudo mkdir -p /data/db $ whoami afifhendrawan $ sudo chown afifhendrawan /data/db
Setting PATH MongoDB
$ cd ~ $ pwd /Users/afifhendrawan $ touch .bash_profile $ vim .bash_profile
export MONGO_PATH=/usr/local/ export PATH=$PATH:$MONGO_PATH/bin
Jalankan Server MongoDB
$ mongod MongoDB starting pid:1453 port=27017 dbpath=/data/db 64bit host=Afif-MacBook-Pro.local //... waiting connection on port 27017
Jalankan MongoDB
$ mongo -version //cek versi MongoDB $ mongo //menjalankan client MongoDB
$ mongo --dbpath /path