MongoDB-使用不同端口上的正确配置自动启动

问题描述 投票:0回答:1

我有两个在端口27017和27018上运行的mongoDB,现在发生了两次,有人修补了服务器(Red Hat Enterprise Linux Server 7.8 Maipo版本),并且mongodb的配置丢失了,所以我必须通过手动修复它mongod -port 27017 -config /etc/mongod.confmongod -port 27018 -config /etc/mongod_second.conf

您能告诉我谁负责该问题,以便自动设置此配置吗?

我需要

  1. 启用mongod即服务,以便在每次服务器补丁后以正确的配置启动mongod?

    • sudo systemctl enable mongod对我不起作用

  1. 告诉正在修补服务器的管理员每次重新启动服务器时都运行此mongod -port 27018 - config ...

感谢您的帮助

mongodb configuration redhat
1个回答
0
投票

[MongoDB提供installation instructions。请跟随他们以正确安装数据库。然后在启动mongod时编辑配置文件,而不是传递参数。

© www.soinside.com 2019 - 2024. All rights reserved.