I installed mongodb from the Ubuntu Software center, but when I want to run it from command line I get an error message like:
mongod --help for help and startup options
Sun Feb 12 10:51:14 [initandlisten] MongoDB starting : pid=2613 port=27017 dbpath=/data/db/ 64-bit
Sun Feb 12 10:51:14 [initandlisten] db version v1.8.2, pdfile version 4.5
Sun Feb 12 10:51:14 [initandlisten] git version: nogitversion
Sun Feb 12 10:51:14 [initandlisten] build sys info: Linux allspice 2.6.24-28-server #1 SMP Wed Aug 18 21:17:51 UTC 2010 x86_64 BOOST_LIB_VERSION=1_46_1
Sun Feb 12 10:51:14 [initandlisten] exception in initAndListen std::exception: Unable to create / open lock file for lockfilepath: /data/db/mongod.lock errno:13 Permission denied, terminating
Sun Feb 12 10:51:14 dbexit:
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to close listening sockets...
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to flush diaglog...
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to close sockets...
Sun Feb 12 10:51:14 [initandlisten] shutdown: waiting for fs preallocator...
Sun Feb 12 10:51:14 [initandlisten] shutdown: closing all files...
Sun Feb 12 10:51:14 closeAllFiles() finished
Sun Feb 12 10:51:14 [initandlisten] shutdown: removing fs lock...
Sun Feb 12 10:51:14 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Sun Feb 12 10:51:14 dbexit: really exiting now
I tried to create a repertory /data/db from my root but for some reason it's not working. Does anyone have a pointer?