I am trying to run my MongoDB on my Linux remote server and keep it running without shutting down when the terminal is closed etc.
I am attempting to use this command to run it as a daemon:
sudo mongod --fork --logpath /var/log/mongodb.log
When I run that command i get the following error:
build environment:
distmod: ubuntu1404
distarch: x86_64
target_arch: x86_64
options: { systemLog: { destination: "file", path: "/var/log/mongodb.log" } }
exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
now exiting
shutting down with code:100
I am not sure how to eliminate this issue so that the mongoDB can keep running in the background on my server. Any help is greatly appreciated.