下载地址:https://www.mongodb.com/try/download/community
mongodb-linux-x86_64-rhel70-6.0.1.tgz
2、上传安装包
cd /usr/local/src/
tar -zxvf mongodb-linux-x86_64-rhel70-6.0.1.tgz
mv mongodb-linux-x86_64-rhel70-6.0.1 /home/soft
cd /home/soft/
mv mongodb-linux-x86_64-rhel70-6.0.1/ mongodb
cd /home/soft/mongodb
mkdir -p /home/soft/mongodb/data /home/soft/mongodb/logs /home/soft/mongodb/conf/
执行cd conf
命令进入配置目录,执行vi mongodb.conf
命令编写配置,在文件中写入:
systemLog:
destination: file
# 配置日志输出路径
path: "/home/soft/mongodb/logs/mongodb.log"
logAppend: true
storage:
# 开启日志
journal:
enab