微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

yum 安装mongodb

要安装最新的64位MongoDB 2.6.0版,步骤如下:

1、创建mongodb.repo文件

在/etc/yum.repos.d/目录下创建文件mongodb.repo,它包含MongoDB仓库的配置信息,内容如下:

复制代码代码如下:

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

2、执行安装命令
$ sudo yum install mongodb-org
Loaded plugins: security
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:01
extras | 3.4 kB 00:00
extras/primary_db | 19 kB 00:00
mongodb | 951 B 00:00
mongodb/primary | 24 kB 00:16
mongodb 155/155
openlogic | 1.3 kB 00:00
openlogic/primary | 273 kB 00:00
openlogic 24/24
updates | 3.4 kB 00:00
updates/primary_db | 2.6 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:2.6.0-1 will be installed
--> Processing Dependency: mongodb-org-tools = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-shell = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-server = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-mongos = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-server.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-shell.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-tools.x86_64 0:2.6.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================
Package Arch Version Repository Size
============================================================================================
Installing:
mongodb-org x86_64 2.6.0-1 mongodb 4.6 k
Installing for dependencies:
mongodb-org-mongos x86_64 2.6.0-1 mongodb 6.8 M
mongodb-org-server x86_64 2.6.0-1 mongodb 8.9 M
mongodb-org-shell x86_64 2.6.0-1 mongodb 4.2 M
mongodb-org-tools x86_64 2.6.0-1 mongodb 88 M

Transaction Summary
============================================================================================
Install 5 Package(s)

Total download size: 108 M Installed size: 274 M Is this ok [y/N]: y

原文地址:https://www.jb51.cc/bash/389659.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐