https://developer.aliyun.com/article/983777
我遇到的问题:如何以集群的方式启动,使用replSet的方式进行启动:
需要在配置文件上加上replSet的信息
port=27017 #端口
bind_ip=0.0.0.0 #默认是127.0.0.1
dbpath=/usr/local/mongodb/data #数据库存放
replSet=rs0 # 以集群方式repSet启动
logpath=/usr/local/mongodb/logs/mongodb.log #日志文件
fork=true #设置后台运行
#auth=true #开启认证