Linux麒麟系统离线安装MongoDB
目录
1、下载MongoDB版本
2、上传文件并解压
3、手动创建目录
4、创建配置文件
5、启动服务
6、验证服务启动是否成功
7、停止和关闭服务的方式
7.2 常见问题
下载MongoDB版本
官网地址 :https://www.mongodb.com/try/download/community-edition/releases/archive
用图片这个
上传文件并解压
tar -xvf mongodb-linux-x86_64-4.0.28.tgz
手动创建目录
#自定义数据存储目录
mkdir -p /data/mongodb/single/data/db
#自定义日志存储目录
mkdir -p /data/mongodb/single/log
创建配置文件
vi /data/mongodb/single/mongod.conf
systemLog:
#MongoDB发送所有日志输出的目标指定为文件
# #The path of the log file to which mongod or mongos should send all diagnostic logging information
destination: file
#mongod或mongos应向其发送所