快活林资源网 Design By www.csstdc.com
前言
MongoDB 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。MongoDB是深受广大开源爱好者支持和研究的NoSQL数据库之一,它基于灵活的JSON文档方式,非常适合敏捷开发,其高可用功能强大,支持水平扩展等众多关键特性。一如其简约而不简单的MySQL一样,安装起来也非常方便,支持源码编译安装,rpm安装以及yum安装等众多方式。本文主要讲述在CentOS 7下用yum方式快速安装MongoDB的方法,下面来一起看看吧。
一、安装环境及配置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 Loaded plugins: fastestmirror, langpacks base | 3.6 kB 00:00:00 epel/x86_64/metalink | 5.2 kB 00:00:00 extras | 3.4 kB 00:00:00 mongodb-org-3.2 | 2.5 kB 00:00:00 updates | 3.4 kB 00:00:00 mongodb-org-3.2/7/primary_db | 50 kB 00:00:03 Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package mongodb-org.x86_64 0:3.2.10-1.el7 will be installed --> Processing Dependency: mongodb-org-tools = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64 --> Processing Dependency: mongodb-org-shell = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64 --> Processing Dependency: mongodb-org-server = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64 --> Processing Dependency: mongodb-org-mongos = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64 --> Running transaction check ---> Package mongodb-org-mongos.x86_64 0:3.2.10-1.el7 will be installed ---> Package mongodb-org-server.x86_64 0:3.2.10-1.el7 will be installed ---> Package mongodb-org-shell.x86_64 0:3.2.10-1.el7 will be installed ---> Package mongodb-org-tools.x86_64 0:3.2.10-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================== Package Arch Version Repository Size =================================================================================================== Installing: mongodb-org x86_64 3.2.10-1.el7 mongodb-org-3.2 5.8 k Installing for dependencies: mongodb-org-mongos x86_64 3.2.10-1.el7 mongodb-org-3.2 5.6 M mongodb-org-server x86_64 3.2.10-1.el7 mongodb-org-3.2 12 M mongodb-org-shell x86_64 3.2.10-1.el7 mongodb-org-3.2 6.7 M mongodb-org-tools x86_64 3.2.10-1.el7 mongodb-org-3.2 41 M Transaction Summary =================================================================================================== Install 1 Package (+4 Dependent packages) Total download size: 65 M Installed size: 201 M Downloading packages: warning: /var/cache/yum/x86_64/7/mongodb-org-3.2/packages/mongodb-org-3.2.10-1.el7.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID ea312927: NOKEY ] Public key for mongodb-org-3.2.10-1.el7.x86_64.rpm is not installed (1/5): mongodb-org-3.2.10-1.el7.x86_64.rpm | 5.8 kB 00:00:04 (2/5): mongodb-org-server-3.2.10-1.el7.x86_64.rpm | 12 MB 00:00:11 (3/5): mongodb-org-shell-3.2.10-1.el7.x86_64.rpm | 6.7 MB 00:00:06 (4/5): mongodb-org-tools-3.2.10-1.el7.x86_64.rpm | 41 MB 00:00:36 (5/5): mongodb-org-mongos-3.2.10-1.el7.x86_64.rpm | 5.6 MB 00:03:28 --------------------------------------------------------------------------------------------------- Total 322 kB/s | 65 MB 00:03:28 Retrieving key from https://www.mongodb.org/static/pgp/server-3.2.asc Importing GPG key 0xEA312927: Userid : "MongoDB 3.2 Release Signing Key <packaging@mongodb.com>" Fingerprint: 42f3 e95a 2c4f 0827 9c49 60ad d68f a50f ea31 2927 From : https://www.mongodb.org/static/pgp/server-3.2.asc Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mongodb-org-tools-3.2.10-1.el7.x86_64 1/5 Installing : mongodb-org-mongos-3.2.10-1.el7.x86_64 2/5 Installing : mongodb-org-shell-3.2.10-1.el7.x86_64 3/5 Installing : mongodb-org-server-3.2.10-1.el7.x86_64 4/5 Installing : mongodb-org-3.2.10-1.el7.x86_64 5/5 Verifying : mongodb-org-server-3.2.10-1.el7.x86_64 1/5 Verifying : mongodb-org-3.2.10-1.el7.x86_64 2/5 Verifying : mongodb-org-shell-3.2.10-1.el7.x86_64 3/5 Verifying : mongodb-org-mongos-3.2.10-1.el7.x86_64 4/5 Verifying : mongodb-org-tools-3.2.10-1.el7.x86_64 5/5 Installed: mongodb-org.x86_64 0:3.2.10-1.el7 Dependency Installed: mongodb-org-mongos.x86_64 0:3.2.10-1.el7 #Author : Leshami mongodb-org-server.x86_64 0:3.2.10-1.el7 #Blog : http://blog.csdn.net/leshami mongodb-org-shell.x86_64 0:3.2.10-1.el7 mongodb-org-tools.x86_64 0:3.2.10-1.el7 Complete!
三、验证安装结果
# rpm -qa |grep mongodb mongodb-org-3.2.10-1.el7.x86_64 mongodb-org-mongos-3.2.10-1.el7.x86_64 mongodb-org-shell-3.2.10-1.el7.x86_64 mongodb-org-server-3.2.10-1.el7.x86_64 mongodb-org-tools-3.2.10-1.el7.x86_64 # rpm -ql mongodb-org-server /etc/init.d/mongod /etc/mongod.conf /etc/sysconfig/mongod /usr/bin/mongod /usr/share/doc/mongodb-org-server-3.2.10 /usr/share/doc/mongodb-org-server-3.2.10/GNU-AGPL-3.0 /usr/share/doc/mongodb-org-server-3.2.10/MPL-2 /usr/share/doc/mongodb-org-server-3.2.10/README /usr/share/doc/mongodb-org-server-3.2.10/THIRD-PARTY-NOTICES /usr/share/man/man1/mongod.1 /var/lib/mongo /var/log/mongodb /var/log/mongodb/mongod.log /var/run/mongodb [root@localhost ~]# /etc/init.d/mongod start Starting mongod (via systemctl): [ OK ] [root@localhost ~]# netstat -nltp|grep mongo tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 89958/mongod # mongo MongoDB shell version: 3.2.10 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions"color: #ff0000">总结以上就是关于在CentOS 7系统下利用yum方式快速安装MongoDB的方法,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。
快活林资源网 Design By www.csstdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
快活林资源网 Design By www.csstdc.com
暂无评论...
更新日志
2024年05月20日
2024年05月20日
- 林一峰2017-绝对清白2CD[香港首版][WAV+CUE
- 石凯《数星一整夜》[320K/MP3][44.18MB]
- 石凯《数星一整夜》[24bit 48kHz][FLAC/分轨][395.49MB]
- 邰正宵《重燃爱恋 贰 Walk On》[320K/MP3][158.71MB]
- 林一峰2003-床头歌[华纳][WAV+CUE]
- 张琍敏1983-又见牵手[台湾留声复刻版][WAV+CUE]
- 张琍敏1978-雪中莲[台湾复刻版][WAV+CUE]
- 叶蕴仪1993-睡美人[日本版][WAV+CUE]
- 夜晚助兴音乐-群星《新时代床头音乐-性能量》2CD[WAV]
- 24K德国HD金碟《历届奥斯卡获奖金曲》3CD[WAV整轨]
- 邰正宵《重燃爱恋 贰 Walk On》[FLAC/分轨][431.72MB]
- 苏文劭《雨停出来走走》[320K/MP3][81.11MB]
- 苏文劭《雨停出来走走》[FLAC/分轨][210.76MB]
- 群星《2024好听新歌04》十倍音质WAV分轨
- 陈宁《弹指之间HQ》头版限量[低速原抓WAV+CUE]