MongoDB在CentOS 7上的systemctl服务配置
时间:2014-09-17 10:58 来源:linux.it.net.cn 作者:it
[Unit]
Description=mongodb
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/mongodb_data/data/mongod.lock
ExecStart=/usr/local/mongodb/mongod --dbpath=/mongodb_data/data/ --logpath=/mongodb_data/log/mongodb.log --logappend --fork
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target (责任编辑:IT)
[Unit] Description=mongodb After=network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/mongodb_data/data/mongod.lock ExecStart=/usr/local/mongodb/mongod --dbpath=/mongodb_data/data/ --logpath=/mongodb_data/log/mongodb.log --logappend --fork ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target (责任编辑:IT) |