I am trying to setup mongodb as a service.
service mongod status
mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-01-21 10:17:13 IST; 2s ago
Docs: https://docs.mongodb.org/manual
Process: 13220 ExecStart=/bin/bash /home/idt/bin/mongod --config /etc/mongod.conf (code=exited, status=127)
Main PID: 13220 (code=exited, status=127)
The mongod.conf file is as follows
cat /etc/mongod.conf
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
systemLog:
destination: file
path: /var/log/mongodb/mongod.log
logAppend: true
storage:
dbPath: /data/db
journal:
enabled: true
processManagement:
fork: true
net:
bindIp: 127.0.0.1
port: 27017
setParameter:
enableLocalhostAuthBypass: false
=======