MongoDB Archive

Content of mongod.service file for mongod service for Red Hat Enterprise Linux or Cent OS

Please find the content of mongod.service file which needs to be created for starting mongod service.   Description=MongoDB Database Server Documentation=https://docs.mongodb.org/manual After=network-online.target Wants=network-online.target User=mongod Group=mongod Environment=”OPTIONS=-f /etc/mongod.conf” EnvironmentFile=-/etc/sysconfig/mongod ExecStart=/usr/bin/mongod $OPTIONS ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb ExecStartPre=/usr/bin/chown mongod:mongod …