When I tried to start MongoDB with the mongod
command I got the following.
garrett@mint-desktop ~ $ mongod
mongod --help for help and startup options
Sun Jan 10 14:50:55.049 [initandlisten] MongoDB starting : pid=23327 port=27017 dbpath=/data/db/ 64-bit host=mint-desktop
Sun Jan 10 14:50:55.050 [initandlisten] db version v2.4.9
Sun Jan 10 14:50:55.050 [initandlisten] git version: nogitversion
Sun Jan 10 14:50:55.050 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Sun Jan 10 14:50:55.050 [initandlisten] allocator: tcmalloc
Sun Jan 10 14:50:55.050 [initandlisten] options: {}
Sun Jan 10 14:50:55.050 [initandlisten] exception in initAndListen: 10296
*********************************************************************
ERROR: dbpath (/data/db/) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
Sun Jan 10 14:50:55.050 dbexit:
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: going to close listening sockets...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: going to flush diaglog...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: going to close sockets...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: waiting for fs preallocator...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: lock for final commit...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: final commit...
Sun Jan 10 14:50:55.050 [initandlisten] shutdown: closing all files...
Sun Jan 10 14:50:55.050 [initandlisten] closeAllFiles() finished
Sun Jan 10 14:50:55.050 dbexit: really exiting now
I then ran sudo mkdir /data/db
and now I'm getting this.
garrett@mint-desktop ~ $ mongod
mongod --help for help and startup options
Sun Jan 10 14:52:24.797 [initandlisten] MongoDB starting : pid=23762 port=27017 dbpath=/data/db/ 64-bit host=mint-desktop
Sun Jan 10 14:52:24.797 [initandlisten] db version v2.4.9
Sun Jan 10 14:52:24.797 [initandlisten] git version: nogitversion
Sun Jan 10 14:52:24.797 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Sun Jan 10 14:52:24.797 [initandlisten] allocator: tcmalloc
Sun Jan 10 14:52:24.797 [initandlisten] options: {}
Sun Jan 10 14:52:24.798 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
Sun Jan 10 14:52:24.798 dbexit:
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: going to close listening sockets...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: going to flush diaglog...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: going to close sockets...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: waiting for fs preallocator...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: lock for final commit...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: final commit...
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: closing all files...
Sun Jan 10 14:52:24.798 [initandlisten] closeAllFiles() finished
Sun Jan 10 14:52:24.798 [initandlisten] shutdown: removing fs lock...
Sun Jan 10 14:52:24.798 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Sun Jan 10 14:52:24.798 dbexit: really exiting now
Any ideas?