Last active
April 9, 2020 02:54
-
-
Save pgbezerra/98016c2a89126c59bca3260e07bbdc44 to your computer and use it in GitHub Desktop.
Systemd mongod mongos scripts
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=syslog.target | |
After=network.target | |
[Service] | |
User=mongodb | |
Group=mongodb | |
Type=forking | |
RuntimeDirectory=mongodb | |
RuntimeDirectoryMode=755 | |
PIDFile=/var/run/mongodb/mongos.pid | |
ExecStart=/usr/bin/mongod --quiet \ | |
--config /etc/mongod.conf \ | |
--pidfilepath /var/run/mongodb/mongod.pid \ | |
--fork | |
LimitFSIZE=infinity | |
LimitCPU=infinity | |
LimitAS=infinity | |
LimitNOFILE=64000 | |
LimitNPROC=64000 | |
[Install] | |
WantedBy=multi-user.target |
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=syslog.target | |
After=network.target | |
[Service] | |
User=mongodb | |
Group=mongodb | |
Type=forking | |
RuntimeDirectory=mongodb | |
RuntimeDirectoryMode=755 | |
PIDFile=/var/run/mongodb/mongos.pid | |
ExecStart=/usr/bin/mongos --quiet \ | |
--config /etc/mongos.conf \ | |
--pidfilepath /var/run/mongodb/mongos.pid \ | |
--fork | |
LimitFSIZE=infinity | |
LimitCPU=infinity | |
LimitAS=infinity | |
LimitNOFILE=64000 | |
LimitNPROC=64000 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type=simple
and skipping--fork
off should work as well (and is closer to the mongod.service in the official packages