我有问题。我已将mongodb部署为ops Manager,但是由于TAR文件的原因,这台服务器中没有Internet访问权限。
因此,我正在尝试将mongo作为服务启动,但是它不起作用。当我尝试通过systemctl启动该服务时,它看起来像mongod进程在运行,但是通过它自身,该进程会启动关闭,直到现在我都没有发现任何错误。
如果尝试使用相同的配置文件从shell运行mongod进程,则启动过程不会出现任何问题。
我做错了什么?
这是我的文件:
配置文件:
storage:
dbPath: /var/lib/mongo/
systemLog:
destination: file
path: /var/log/mongodb/mongod.log
processManagement:
fork: true
服务文件:
[Unit]
Description=document-oriented database
Documentation=man:mongod(1)
After=network.target
[Service]
User=mongod
Group=mongod
RuntimeDirectory=mongodb
RuntimeDirectoryMode=0755
EnvironmentFile=-/etc/default/mongodb
Environment=CONF=/etc/mongod.conf
Environment=SOCKETPATH=/run/mongodb
ExecStart=/usr/local/bin/mongod --config ${CONF}
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=64000
LimitNPROC=64000
[Install]
WantedBy=multi-user.target
Here I tried to start the service then I checked status