Created
March 23, 2018 20:50
-
-
Save imravichaudhary/dff505e854f384cb315c3a1939682a3b to your computer and use it in GitHub Desktop.
MongoDB service and configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net: | |
bindIp: 0.0.0.0 | |
port: 27000 | |
processManagement: | |
fork: "true" | |
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile | |
security: | |
authorization: enabled | |
keyFile: /var/lib/mongodb-mms-automation/keyfile | |
storage: | |
dbPath: /app/mongodb/oplog/data | |
systemLog: | |
destination: file | |
path: /app/mongodb/oplog/data/mongodb.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=High-performance, schema-free document-oriented database | |
After=network.target | |
Documentation=https://docs.mongodb.org/manual | |
[Service] | |
User=mongod | |
Group=mongod | |
ExecStart=/var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.2-ent/bin/mongod --config /etc/mongod.conf | |
ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb | |
ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb | |
ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb | |
PermissionsStartOnly=true | |
PIDFile=/var/run/mongodb/mongod.pid | |
Type=forking | |
# file size | |
LimitFSIZE=infinity | |
# cpu time | |
LimitCPU=infinity | |
# virtual memory size | |
LimitAS=infinity | |
# open files | |
LimitNOFILE=64000 | |
# processes/threads | |
LimitNPROC=64000 | |
# locked memory | |
LimitMEMLOCK=infinity | |
# total threads (user+kernel) | |
TasksMax=infinity | |
TasksAccounting=false | |
# Recommended limits for for mongod as specified in | |
# http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment