mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
bd7863be22
Closes #1338 Signed-off-by: dhatcher42 <daniel.hatcher@mongodb.com>
38 lines
936 B
Desktop File
38 lines
936 B
Desktop File
[Unit]
|
|
Description=MongoDB Database Server
|
|
Documentation=https://docs.mongodb.org/manual
|
|
After=network.target
|
|
|
|
[Service]
|
|
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 /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 mongod as specified in
|
|
# https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|