一、安装环境及配置yum
# more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # vi /etc/yum.repos.d/mongodb-org-3.2.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
二、安装MongoDB
yum -y install mongodb-org
安装完成
rpm -qa |grep mongodb
查看安装组件
rpm -ql mongodb-org-server
/etc/init.d/mongod start
netstat -nltp|grep mongo
mongo