rpm方式安装MongoDB
- 从指定路径下载rpm
例如: https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/
1 2 3 4 5
| wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-3.2.19-1.el7.x86_64.rpm wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-mongos-3.2.19-1.el7.x86_64.rpm wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-server-3.2.19-1.el7.x86_64.rpm wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-shell-3.2.19-1.el7.x86_64.rpm wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-tools-3.2.19-1.el7.x86_64.rpm
|
- 开始安装
1 2 3 4 5
| rpm -ivh mongodb-org-mongos-3.2.19-1.el7.x86_64.rpm rpm -ivh mongodb-org-server-3.2.19-1.el7.x86_64.rpm rpm -ivh mongodb-org-shell-3.2.19-1.el7.x86_64.rpm rpm -ivh mongodb-org-tools-3.2.19-1.el7.x86_64.rpm rpm -ivh mongodb-org-3.2.19-1.el7.x86_64.rpm
|
- 启动mongodb
1 2
| service mongod start service mongod status
|