下载 mkdir /software cd /software wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.13.tgz 安装 tar xf mongodb-linux-x86_64-4.0.13.tgz -C /usr/local/ cd /usr/local/ ln -s mongodb-linux-x86_64-4.0.13/ mongodb 配置 vim /usr/local/mongodb/bin/mongodb.conf dbpath = /usr/local/mongodb/data/db