一、环境
操作系统 安装包 安装方式Ubuntu18.04 mongodb4.0 apt安装
Ubuntu18.04 mongodb4.0 docker安装
二、apt安装
1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 2 echo "deb [ arch=amd64 ] bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list 3 sudo apt-get update 4 deb [ arch=amd64 ] http://mirrors.aliyun.com/mongodb/apt/ubuntu bionic/mongodb-org/4.0 multiverse 5 sudo service mongod start 6 ps aux | grep mongod