Я установил MongoDB с помощью команды Mac Homebrew, но когда я запустил mongod
Он не распознал мой мой терминал:/
Если я набираю export PATH=$PATH:/usr/local/mongodb/bin
, тогда запустите mongod
, он запустится, но быстро выйдет из
mongod --help for help and startup options
Sun Jan 20 18:59:25 [initandlisten] MongoDB starting : pid=59800 port=27017 dbpath=/data/db/ 64-bit host=Kevin-Tucks-MacBook-Pro.local
Sun Jan 20 18:59:25 [initandlisten] db version v2.0.4, pdfile version 4.5
Sun Jan 20 18:59:25 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506cb21f8ebf
Sun Jan 20 18:59:25 [initandlisten] build info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Sun Jan 20 18:59:25 [initandlisten] options: {}
Sun Jan 20 18:59:25 [initandlisten] journal dir=/data/db/journal
Sun Jan 20 18:59:25 [initandlisten] recover : no journal files present, no recovery needed
Sun Jan 20 18:59:25 [initandlisten] preallocateIsFaster=true 2.38
Sun Jan 20 18:59:25 [websvr] ERROR: listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:28017
Sun Jan 20 18:59:25 [websvr] ERROR: addr already in use
Sun Jan 20 18:59:25 [initandlisten] ERROR: listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
Sun Jan 20 18:59:25 [initandlisten] ERROR: addr already in use
Sun Jan 20 18:59:25 [initandlisten] now exiting
Sun Jan 20 18:59:25 dbexit:
Sun Jan 20 18:59:25 [initandlisten] shutdown: going to close listening sockets...
Sun Jan 20 18:59:25 [initandlisten] shutdown: going to flush diaglog...
Sun Jan 20 18:59:25 [initandlisten] shutdown: going to close sockets...
Sun Jan 20 18:59:25 [initandlisten] shutdown: waiting for fs preallocator...
Sun Jan 20 18:59:25 [initandlisten] shutdown: lock for final commit...
Sun Jan 20 18:59:25 [initandlisten] shutdown: final commit...
Sun Jan 20 18:59:25 [initandlisten] shutdown: closing all files...
Sun Jan 20 18:59:25 [initandlisten] closeAllFiles() finished
Sun Jan 20 18:59:25 [initandlisten] journalCleanup...
Sun Jan 20 18:59:25 [initandlisten] removeJournalFiles
Sun Jan 20 18:59:25 [initandlisten] shutdown: removing fs lock...
Sun Jan 20 18:59:25 dbexit: really exiting now
Я попытался перезапустить свою оболочку, но если я снова попытаюсь запустить mongod
, он будет возвращен как непризнанный и потребует, чтобы я перепечатал его в export PATH=$PATH:/usr/local/mongodb/bin
.