mongodb 官网
地址:https://www.mongodb.com/try/download/community
官网需要下载的包:
mongodb 的安装
mkdir -p /data/soft/install/mongodb/
cd /data/soft/install/mongodb/
#下载 mongodb 相关包
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-mongos-5.0.5-1.el7.x86_64.rpm
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.5-1.el7.x86_64.rpm
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-shell-5.0.5-1.el7.x86_64.rpm
#使用 yum 安装 mongodb,可以解决依赖包问题
yum install mongodb-org-* -y
#启动 mongodb
systemctl start mongod.service
#进入shell
mongo